adaline-api 1.0.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- adaline_api/__init__.py +193 -0
- adaline_api/api/__init__.py +5 -0
- adaline_api/api/default_api.py +1221 -0
- adaline_api/api_client.py +804 -0
- adaline_api/api_response.py +21 -0
- adaline_api/configuration.py +582 -0
- adaline_api/exceptions.py +216 -0
- adaline_api/models/__init__.py +89 -0
- adaline_api/models/api_message_content.py +113 -0
- adaline_api/models/api_message_content_type.py +113 -0
- adaline_api/models/base64_hosted_image_content_value.py +99 -0
- adaline_api/models/base64_hosted_image_content_value_type.py +99 -0
- adaline_api/models/base64_hosted_pdf_content_value.py +99 -0
- adaline_api/models/base64_hosted_pdf_content_value_type.py +99 -0
- adaline_api/models/base64_image_content_value.py +105 -0
- adaline_api/models/base64_image_content_value_type.py +105 -0
- adaline_api/models/base64_media.py +118 -0
- adaline_api/models/base64_media_type.py +118 -0
- adaline_api/models/base64_pdf_content_value.py +96 -0
- adaline_api/models/base64_pdf_content_value_type.py +96 -0
- adaline_api/models/base_entity.py +96 -0
- adaline_api/models/config_type.py +94 -0
- adaline_api/models/content.py +196 -0
- adaline_api/models/content_type.py +196 -0
- adaline_api/models/create_log_span_request.py +94 -0
- adaline_api/models/create_log_span_request_span.py +150 -0
- adaline_api/models/create_log_span_request_type.py +94 -0
- adaline_api/models/create_log_span_response.py +88 -0
- adaline_api/models/create_log_span_response_type.py +88 -0
- adaline_api/models/create_log_trace_request.py +104 -0
- adaline_api/models/create_log_trace_request_span.py +146 -0
- adaline_api/models/create_log_trace_request_trace.py +122 -0
- adaline_api/models/create_log_trace_request_type.py +104 -0
- adaline_api/models/create_log_trace_response.py +90 -0
- adaline_api/models/create_log_trace_response_type.py +90 -0
- adaline_api/models/deployment.py +107 -0
- adaline_api/models/deployment_prompt.py +121 -0
- adaline_api/models/deployment_prompt_config.py +94 -0
- adaline_api/models/deployment_prompt_config_type.py +94 -0
- adaline_api/models/deployment_prompt_type.py +121 -0
- adaline_api/models/deployment_prompt_variables.py +96 -0
- adaline_api/models/deployment_prompt_variables_type.py +96 -0
- adaline_api/models/deployment_type.py +107 -0
- adaline_api/models/deployment_type_prompt.py +121 -0
- adaline_api/models/enum_value.py +166 -0
- adaline_api/models/enum_value_type.py +166 -0
- adaline_api/models/error_response.py +91 -0
- adaline_api/models/error_response_type.py +91 -0
- adaline_api/models/function.py +101 -0
- adaline_api/models/function_parameter.py +139 -0
- adaline_api/models/function_parameter_type.py +139 -0
- adaline_api/models/function_parameters.py +115 -0
- adaline_api/models/function_parameters_type.py +115 -0
- adaline_api/models/function_request_http.py +121 -0
- adaline_api/models/function_request_http_type.py +121 -0
- adaline_api/models/function_request_retry.py +92 -0
- adaline_api/models/function_request_retry_type.py +92 -0
- adaline_api/models/function_tool.py +106 -0
- adaline_api/models/function_tool_definition.py +91 -0
- adaline_api/models/function_tool_definition_type.py +104 -0
- adaline_api/models/function_tool_type.py +106 -0
- adaline_api/models/function_tool_type_definition.py +91 -0
- adaline_api/models/function_type.py +106 -0
- adaline_api/models/image_content.py +109 -0
- adaline_api/models/image_content_type.py +109 -0
- adaline_api/models/image_content_value.py +140 -0
- adaline_api/models/image_content_value_type.py +140 -0
- adaline_api/models/image_message_content.py +111 -0
- adaline_api/models/image_message_content_type.py +111 -0
- adaline_api/models/image_message_content_type_value.py +154 -0
- adaline_api/models/image_message_content_value.py +154 -0
- adaline_api/models/image_source.py +140 -0
- adaline_api/models/image_source_type.py +140 -0
- adaline_api/models/log_attributes_value.py +160 -0
- adaline_api/models/log_feedback_comment.py +98 -0
- adaline_api/models/log_span.py +180 -0
- adaline_api/models/log_span_all_of_internal_feedback.py +98 -0
- adaline_api/models/log_span_content.py +224 -0
- adaline_api/models/log_span_embeddings_content.py +101 -0
- adaline_api/models/log_span_event.py +96 -0
- adaline_api/models/log_span_function_content.py +101 -0
- adaline_api/models/log_span_guardrail_content.py +101 -0
- adaline_api/models/log_span_model_content.py +109 -0
- adaline_api/models/log_span_model_stream_content.py +111 -0
- adaline_api/models/log_span_other_content.py +101 -0
- adaline_api/models/log_span_parsed_content.py +101 -0
- adaline_api/models/log_span_retrieval_content.py +101 -0
- adaline_api/models/log_span_tool_content.py +101 -0
- adaline_api/models/log_trace.py +132 -0
- adaline_api/models/log_trace_attributes_inner.py +102 -0
- adaline_api/models/log_trace_attributes_value.py +160 -0
- adaline_api/models/log_trace_attributes_value_type.py +160 -0
- adaline_api/models/log_trace_tags_inner.py +96 -0
- adaline_api/models/log_trace_type.py +132 -0
- adaline_api/models/log_trace_type_attributes_inner.py +102 -0
- adaline_api/models/log_trace_type_tags_inner.py +96 -0
- adaline_api/models/mcp_server.py +114 -0
- adaline_api/models/mcp_server_tool_configuration.py +90 -0
- adaline_api/models/mcp_server_tool_configuration_type.py +90 -0
- adaline_api/models/mcp_server_type.py +114 -0
- adaline_api/models/message.py +98 -0
- adaline_api/models/message_content_inner.py +182 -0
- adaline_api/models/message_content_type_inner.py +182 -0
- adaline_api/models/message_type.py +98 -0
- adaline_api/models/modality_enum.py +41 -0
- adaline_api/models/modality_enum_type.py +41 -0
- adaline_api/models/pdf_content.py +106 -0
- adaline_api/models/pdf_content_file.py +91 -0
- adaline_api/models/pdf_content_type.py +106 -0
- adaline_api/models/pdf_content_type_file.py +91 -0
- adaline_api/models/pdf_content_value.py +140 -0
- adaline_api/models/pdf_content_value_type.py +140 -0
- adaline_api/models/pdf_message_content.py +108 -0
- adaline_api/models/pdf_message_content_file.py +91 -0
- adaline_api/models/pdf_message_content_type.py +108 -0
- adaline_api/models/pdf_message_content_type_file.py +91 -0
- adaline_api/models/pdf_message_content_type_value.py +154 -0
- adaline_api/models/pdf_message_content_value.py +154 -0
- adaline_api/models/prompt_variable.py +96 -0
- adaline_api/models/prompt_variable_value.py +210 -0
- adaline_api/models/reasoning_content.py +100 -0
- adaline_api/models/reasoning_content_type.py +100 -0
- adaline_api/models/reasoning_content_value.py +98 -0
- adaline_api/models/reasoning_content_value_type.py +98 -0
- adaline_api/models/reasoning_content_value_union.py +140 -0
- adaline_api/models/reasoning_content_value_union_type.py +140 -0
- adaline_api/models/reasoning_message_content.py +102 -0
- adaline_api/models/reasoning_message_content_type.py +102 -0
- adaline_api/models/reasoning_message_content_type_value.py +140 -0
- adaline_api/models/reasoning_message_content_value.py +140 -0
- adaline_api/models/reasoning_redacted_value.py +109 -0
- adaline_api/models/reasoning_redacted_value_type.py +109 -0
- adaline_api/models/reasoning_thinking_value.py +111 -0
- adaline_api/models/reasoning_thinking_value_type.py +111 -0
- adaline_api/models/reasoning_value.py +140 -0
- adaline_api/models/reasoning_value_type.py +140 -0
- adaline_api/models/redacted_reasoning_content_value.py +96 -0
- adaline_api/models/redacted_reasoning_content_value_type.py +96 -0
- adaline_api/models/response_schema.py +105 -0
- adaline_api/models/response_schema_property.py +135 -0
- adaline_api/models/response_schema_property_enum_inner.py +166 -0
- adaline_api/models/response_schema_property_type.py +143 -0
- adaline_api/models/response_schema_property_type_enum_inner.py +166 -0
- adaline_api/models/response_schema_property_type_type.py +143 -0
- adaline_api/models/response_schema_structure.py +122 -0
- adaline_api/models/response_schema_structure_type.py +122 -0
- adaline_api/models/response_schema_type.py +105 -0
- adaline_api/models/role_enum.py +39 -0
- adaline_api/models/role_enum_type.py +39 -0
- adaline_api/models/span_content_detailed.py +112 -0
- adaline_api/models/span_content_detailed_type.py +112 -0
- adaline_api/models/span_content_detailed_type_variables_value.py +94 -0
- adaline_api/models/span_content_detailed_variables_value.py +94 -0
- adaline_api/models/span_content_minimal.py +91 -0
- adaline_api/models/span_content_minimal_type.py +91 -0
- adaline_api/models/span_log_req_attributes.py +160 -0
- adaline_api/models/span_log_req_attributes_type.py +160 -0
- adaline_api/models/span_log_req_content.py +137 -0
- adaline_api/models/span_log_req_content_type.py +137 -0
- adaline_api/models/span_log_request.py +93 -0
- adaline_api/models/span_log_request_span.py +139 -0
- adaline_api/models/span_log_request_type.py +93 -0
- adaline_api/models/span_log_request_type_span.py +139 -0
- adaline_api/models/span_log_response.py +87 -0
- adaline_api/models/span_log_response_type.py +87 -0
- adaline_api/models/spans_request_attribute_value.py +160 -0
- adaline_api/models/spans_request_attribute_value_type.py +160 -0
- adaline_api/models/spans_request_content_value.py +143 -0
- adaline_api/models/spans_request_content_value_type.py +143 -0
- adaline_api/models/text_content.py +96 -0
- adaline_api/models/text_content_type.py +96 -0
- adaline_api/models/text_message_content.py +98 -0
- adaline_api/models/text_message_content_type.py +98 -0
- adaline_api/models/tool_call_content.py +105 -0
- adaline_api/models/tool_call_content_type.py +105 -0
- adaline_api/models/tool_call_message_content.py +107 -0
- adaline_api/models/tool_call_message_content_type.py +107 -0
- adaline_api/models/tool_response_content.py +109 -0
- adaline_api/models/tool_response_content_api_response.py +88 -0
- adaline_api/models/tool_response_content_type.py +109 -0
- adaline_api/models/tool_response_content_type_api_response.py +88 -0
- adaline_api/models/tool_response_message_content.py +111 -0
- adaline_api/models/tool_response_message_content_api_response.py +87 -0
- adaline_api/models/tool_response_message_content_type.py +111 -0
- adaline_api/models/tool_response_message_content_type_api_response.py +87 -0
- adaline_api/models/tool_type.py +113 -0
- adaline_api/models/trace_log_patch_request.py +137 -0
- adaline_api/models/trace_log_patch_request_one_of.py +97 -0
- adaline_api/models/trace_log_patch_request_one_of1.py +97 -0
- adaline_api/models/trace_log_patch_request_type.py +137 -0
- adaline_api/models/trace_log_patch_request_type_one_of.py +97 -0
- adaline_api/models/trace_log_patch_request_type_one_of1.py +97 -0
- adaline_api/models/trace_log_patch_response.py +87 -0
- adaline_api/models/trace_log_patch_response_type.py +87 -0
- adaline_api/models/trace_log_request.py +103 -0
- adaline_api/models/trace_log_request_spans_inner.py +135 -0
- adaline_api/models/trace_log_request_trace.py +121 -0
- adaline_api/models/trace_log_request_type.py +103 -0
- adaline_api/models/trace_log_request_type_spans_inner.py +135 -0
- adaline_api/models/trace_log_request_type_trace.py +121 -0
- adaline_api/models/trace_log_response.py +89 -0
- adaline_api/models/trace_log_response_type.py +89 -0
- adaline_api/models/trace_request_attribute_value.py +160 -0
- adaline_api/models/trace_request_attribute_value_type.py +160 -0
- adaline_api/models/update_log_trace_request.py +98 -0
- adaline_api/models/update_log_trace_request_attribute_item.py +140 -0
- adaline_api/models/update_log_trace_request_attribute_item_one_of.py +102 -0
- adaline_api/models/update_log_trace_request_attribute_item_one_of1.py +96 -0
- adaline_api/models/update_log_trace_request_attribute_item_one_of_value.py +160 -0
- adaline_api/models/update_log_trace_request_tag_item.py +140 -0
- adaline_api/models/update_log_trace_request_tag_item_one_of.py +97 -0
- adaline_api/models/update_log_trace_request_tag_item_one_of1.py +97 -0
- adaline_api/models/update_log_trace_request_trace.py +120 -0
- adaline_api/models/update_log_trace_request_type.py +98 -0
- adaline_api/models/update_log_trace_response.py +87 -0
- adaline_api/models/update_log_trace_response_type.py +87 -0
- adaline_api/models/url_image_content_value.py +96 -0
- adaline_api/models/url_image_content_value_type.py +96 -0
- adaline_api/models/url_media.py +109 -0
- adaline_api/models/url_media_type.py +109 -0
- adaline_api/models/url_pdf_content_value.py +96 -0
- adaline_api/models/url_pdf_content_value_type.py +96 -0
- adaline_api/models/variable.py +96 -0
- adaline_api/models/variable_type.py +96 -0
- adaline_api/models/variable_type_value.py +196 -0
- adaline_api/models/variable_value.py +196 -0
- adaline_api/models/variables_type.py +96 -0
- adaline_api/py.typed +0 -0
- adaline_api/rest.py +213 -0
- adaline_api-1.0.0.dist-info/METADATA +227 -0
- adaline_api-1.0.0.dist-info/RECORD +233 -0
- adaline_api-1.0.0.dist-info/WHEEL +5 -0
- adaline_api-1.0.0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Adaline API
|
|
5
|
+
|
|
6
|
+
API for managing Adaline deployments, logs, and core type definitions.
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 1.0.0
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
import pprint
|
|
17
|
+
import re # noqa: F401
|
|
18
|
+
import json
|
|
19
|
+
|
|
20
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr
|
|
21
|
+
from typing import Any, ClassVar, Dict, List, Optional, Union
|
|
22
|
+
from typing_extensions import Annotated
|
|
23
|
+
from adaline_api.models.response_schema_property_enum_inner import ResponseSchemaPropertyEnumInner
|
|
24
|
+
from adaline_api.models.response_schema_property_type import ResponseSchemaPropertyType
|
|
25
|
+
from typing import Optional, Set
|
|
26
|
+
from typing_extensions import Self
|
|
27
|
+
|
|
28
|
+
class ResponseSchemaProperty(BaseModel):
|
|
29
|
+
"""
|
|
30
|
+
JSON schema property definition for structured LLM response validation
|
|
31
|
+
""" # noqa: E501
|
|
32
|
+
any_of: Optional[List[Dict[str, Any]]] = Field(default=None, alias="anyOf")
|
|
33
|
+
type: Optional[ResponseSchemaPropertyType] = None
|
|
34
|
+
default: Optional[Any] = None
|
|
35
|
+
title: Optional[StrictStr] = None
|
|
36
|
+
description: Optional[Annotated[str, Field(strict=True, max_length=4096)]] = None
|
|
37
|
+
properties: Optional[Dict[str, Any]] = None
|
|
38
|
+
required: Optional[List[StrictStr]] = None
|
|
39
|
+
min_items: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field(default=None, alias="minItems")
|
|
40
|
+
max_items: Optional[StrictInt] = Field(default=None, alias="maxItems")
|
|
41
|
+
items: Optional[Dict[str, Any]] = Field(default=None, description="Recursive structure to handle nested arrays and objects")
|
|
42
|
+
enum: Optional[List[Optional[ResponseSchemaPropertyEnumInner]]] = Field(default=None, description="Enum for allowed values")
|
|
43
|
+
minimum: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Minimum value for number")
|
|
44
|
+
maximum: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Maximum value for number")
|
|
45
|
+
min_length: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field(default=None, description="Minimum length for string", alias="minLength")
|
|
46
|
+
max_length: Optional[StrictInt] = Field(default=None, description="Maximum length for string", alias="maxLength")
|
|
47
|
+
ref: Optional[StrictStr] = Field(default=None, description="Reference to another schema", alias="$ref")
|
|
48
|
+
__properties: ClassVar[List[str]] = ["anyOf", "type", "default", "title", "description", "properties", "required", "minItems", "maxItems", "items", "enum", "minimum", "maximum", "minLength", "maxLength", "$ref"]
|
|
49
|
+
|
|
50
|
+
model_config = ConfigDict(
|
|
51
|
+
populate_by_name=True,
|
|
52
|
+
validate_assignment=True,
|
|
53
|
+
protected_namespaces=(),
|
|
54
|
+
)
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
def to_str(self) -> str:
|
|
58
|
+
"""Returns the string representation of the model using alias"""
|
|
59
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
60
|
+
|
|
61
|
+
def to_json(self) -> str:
|
|
62
|
+
"""Returns the JSON representation of the model using alias"""
|
|
63
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
64
|
+
return json.dumps(self.to_dict())
|
|
65
|
+
|
|
66
|
+
@classmethod
|
|
67
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
68
|
+
"""Create an instance of ResponseSchemaProperty from a JSON string"""
|
|
69
|
+
return cls.from_dict(json.loads(json_str))
|
|
70
|
+
|
|
71
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
72
|
+
"""Return the dictionary representation of the model using alias.
|
|
73
|
+
|
|
74
|
+
This has the following differences from calling pydantic's
|
|
75
|
+
`self.model_dump(by_alias=True)`:
|
|
76
|
+
|
|
77
|
+
* `None` is only added to the output dict for nullable fields that
|
|
78
|
+
were set at model initialization. Other fields with value `None`
|
|
79
|
+
are ignored.
|
|
80
|
+
"""
|
|
81
|
+
excluded_fields: Set[str] = set([
|
|
82
|
+
])
|
|
83
|
+
|
|
84
|
+
_dict = self.model_dump(
|
|
85
|
+
by_alias=True,
|
|
86
|
+
exclude=excluded_fields,
|
|
87
|
+
exclude_none=True,
|
|
88
|
+
)
|
|
89
|
+
# override the default output from pydantic by calling `to_dict()` of type
|
|
90
|
+
if self.type:
|
|
91
|
+
_dict['type'] = self.type.to_dict()
|
|
92
|
+
# override the default output from pydantic by calling `to_dict()` of each item in enum (list)
|
|
93
|
+
_items = []
|
|
94
|
+
if self.enum:
|
|
95
|
+
for _item_enum in self.enum:
|
|
96
|
+
if _item_enum:
|
|
97
|
+
_items.append(_item_enum.to_dict())
|
|
98
|
+
_dict['enum'] = _items
|
|
99
|
+
# set to None if default (nullable) is None
|
|
100
|
+
# and model_fields_set contains the field
|
|
101
|
+
if self.default is None and "default" in self.model_fields_set:
|
|
102
|
+
_dict['default'] = None
|
|
103
|
+
|
|
104
|
+
return _dict
|
|
105
|
+
|
|
106
|
+
@classmethod
|
|
107
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
108
|
+
"""Create an instance of ResponseSchemaProperty from a dict"""
|
|
109
|
+
if obj is None:
|
|
110
|
+
return None
|
|
111
|
+
|
|
112
|
+
if not isinstance(obj, dict):
|
|
113
|
+
return cls.model_validate(obj)
|
|
114
|
+
|
|
115
|
+
_obj = cls.model_validate({
|
|
116
|
+
"anyOf": obj.get("anyOf"),
|
|
117
|
+
"type": ResponseSchemaPropertyType.from_dict(obj["type"]) if obj.get("type") is not None else None,
|
|
118
|
+
"default": obj.get("default"),
|
|
119
|
+
"title": obj.get("title"),
|
|
120
|
+
"description": obj.get("description"),
|
|
121
|
+
"properties": obj.get("properties"),
|
|
122
|
+
"required": obj.get("required"),
|
|
123
|
+
"minItems": obj.get("minItems"),
|
|
124
|
+
"maxItems": obj.get("maxItems"),
|
|
125
|
+
"items": obj.get("items"),
|
|
126
|
+
"enum": [ResponseSchemaPropertyEnumInner.from_dict(_item) for _item in obj["enum"]] if obj.get("enum") is not None else None,
|
|
127
|
+
"minimum": obj.get("minimum"),
|
|
128
|
+
"maximum": obj.get("maximum"),
|
|
129
|
+
"minLength": obj.get("minLength"),
|
|
130
|
+
"maxLength": obj.get("maxLength"),
|
|
131
|
+
"$ref": obj.get("$ref")
|
|
132
|
+
})
|
|
133
|
+
return _obj
|
|
134
|
+
|
|
135
|
+
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Adaline API
|
|
5
|
+
|
|
6
|
+
API for managing Adaline deployments, logs, and core type definitions.
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 1.0.0
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
import json
|
|
17
|
+
import pprint
|
|
18
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr, ValidationError, field_validator
|
|
19
|
+
from typing import Any, List, Optional, Union
|
|
20
|
+
from pydantic import StrictStr, Field
|
|
21
|
+
from typing import Union, List, Set, Optional, Dict
|
|
22
|
+
from typing_extensions import Literal, Self
|
|
23
|
+
|
|
24
|
+
RESPONSESCHEMAPROPERTYENUMINNER_ONE_OF_SCHEMAS = ["bool", "float", "str"]
|
|
25
|
+
|
|
26
|
+
class ResponseSchemaPropertyEnumInner(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
ResponseSchemaPropertyEnumInner
|
|
29
|
+
"""
|
|
30
|
+
# data type: str
|
|
31
|
+
oneof_schema_1_validator: Optional[StrictStr] = None
|
|
32
|
+
# data type: float
|
|
33
|
+
oneof_schema_2_validator: Optional[Union[StrictFloat, StrictInt]] = None
|
|
34
|
+
# data type: bool
|
|
35
|
+
oneof_schema_3_validator: Optional[StrictBool] = None
|
|
36
|
+
actual_instance: Optional[Union[bool, float, str]] = None
|
|
37
|
+
one_of_schemas: Set[str] = { "bool", "float", "str" }
|
|
38
|
+
|
|
39
|
+
model_config = ConfigDict(
|
|
40
|
+
validate_assignment=True,
|
|
41
|
+
protected_namespaces=(),
|
|
42
|
+
)
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
def __init__(self, *args, **kwargs) -> None:
|
|
46
|
+
if args:
|
|
47
|
+
if len(args) > 1:
|
|
48
|
+
raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`")
|
|
49
|
+
if kwargs:
|
|
50
|
+
raise ValueError("If a position argument is used, keyword arguments cannot be used.")
|
|
51
|
+
super().__init__(actual_instance=args[0])
|
|
52
|
+
else:
|
|
53
|
+
super().__init__(**kwargs)
|
|
54
|
+
|
|
55
|
+
@field_validator('actual_instance')
|
|
56
|
+
def actual_instance_must_validate_oneof(cls, v):
|
|
57
|
+
if v is None:
|
|
58
|
+
return v
|
|
59
|
+
|
|
60
|
+
instance = ResponseSchemaPropertyEnumInner.model_construct()
|
|
61
|
+
error_messages = []
|
|
62
|
+
match = 0
|
|
63
|
+
# validate data type: str
|
|
64
|
+
try:
|
|
65
|
+
instance.oneof_schema_1_validator = v
|
|
66
|
+
match += 1
|
|
67
|
+
except (ValidationError, ValueError) as e:
|
|
68
|
+
error_messages.append(str(e))
|
|
69
|
+
# validate data type: float
|
|
70
|
+
try:
|
|
71
|
+
instance.oneof_schema_2_validator = v
|
|
72
|
+
match += 1
|
|
73
|
+
except (ValidationError, ValueError) as e:
|
|
74
|
+
error_messages.append(str(e))
|
|
75
|
+
# validate data type: bool
|
|
76
|
+
try:
|
|
77
|
+
instance.oneof_schema_3_validator = v
|
|
78
|
+
match += 1
|
|
79
|
+
except (ValidationError, ValueError) as e:
|
|
80
|
+
error_messages.append(str(e))
|
|
81
|
+
if match > 1:
|
|
82
|
+
# more than 1 match
|
|
83
|
+
raise ValueError("Multiple matches found when setting `actual_instance` in ResponseSchemaPropertyEnumInner with oneOf schemas: bool, float, str. Details: " + ", ".join(error_messages))
|
|
84
|
+
elif match == 0:
|
|
85
|
+
# no match
|
|
86
|
+
raise ValueError("No match found when setting `actual_instance` in ResponseSchemaPropertyEnumInner with oneOf schemas: bool, float, str. Details: " + ", ".join(error_messages))
|
|
87
|
+
else:
|
|
88
|
+
return v
|
|
89
|
+
|
|
90
|
+
@classmethod
|
|
91
|
+
def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self:
|
|
92
|
+
return cls.from_json(json.dumps(obj))
|
|
93
|
+
|
|
94
|
+
@classmethod
|
|
95
|
+
def from_json(cls, json_str: Optional[str]) -> Self:
|
|
96
|
+
"""Returns the object represented by the json string"""
|
|
97
|
+
instance = cls.model_construct()
|
|
98
|
+
if json_str is None:
|
|
99
|
+
return instance
|
|
100
|
+
|
|
101
|
+
error_messages = []
|
|
102
|
+
match = 0
|
|
103
|
+
|
|
104
|
+
# deserialize data into str
|
|
105
|
+
try:
|
|
106
|
+
# validation
|
|
107
|
+
instance.oneof_schema_1_validator = json.loads(json_str)
|
|
108
|
+
# assign value to actual_instance
|
|
109
|
+
instance.actual_instance = instance.oneof_schema_1_validator
|
|
110
|
+
match += 1
|
|
111
|
+
except (ValidationError, ValueError) as e:
|
|
112
|
+
error_messages.append(str(e))
|
|
113
|
+
# deserialize data into float
|
|
114
|
+
try:
|
|
115
|
+
# validation
|
|
116
|
+
instance.oneof_schema_2_validator = json.loads(json_str)
|
|
117
|
+
# assign value to actual_instance
|
|
118
|
+
instance.actual_instance = instance.oneof_schema_2_validator
|
|
119
|
+
match += 1
|
|
120
|
+
except (ValidationError, ValueError) as e:
|
|
121
|
+
error_messages.append(str(e))
|
|
122
|
+
# deserialize data into bool
|
|
123
|
+
try:
|
|
124
|
+
# validation
|
|
125
|
+
instance.oneof_schema_3_validator = json.loads(json_str)
|
|
126
|
+
# assign value to actual_instance
|
|
127
|
+
instance.actual_instance = instance.oneof_schema_3_validator
|
|
128
|
+
match += 1
|
|
129
|
+
except (ValidationError, ValueError) as e:
|
|
130
|
+
error_messages.append(str(e))
|
|
131
|
+
|
|
132
|
+
if match > 1:
|
|
133
|
+
# more than 1 match
|
|
134
|
+
raise ValueError("Multiple matches found when deserializing the JSON string into ResponseSchemaPropertyEnumInner with oneOf schemas: bool, float, str. Details: " + ", ".join(error_messages))
|
|
135
|
+
elif match == 0:
|
|
136
|
+
# no match
|
|
137
|
+
raise ValueError("No match found when deserializing the JSON string into ResponseSchemaPropertyEnumInner with oneOf schemas: bool, float, str. Details: " + ", ".join(error_messages))
|
|
138
|
+
else:
|
|
139
|
+
return instance
|
|
140
|
+
|
|
141
|
+
def to_json(self) -> str:
|
|
142
|
+
"""Returns the JSON representation of the actual instance"""
|
|
143
|
+
if self.actual_instance is None:
|
|
144
|
+
return "null"
|
|
145
|
+
|
|
146
|
+
if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json):
|
|
147
|
+
return self.actual_instance.to_json()
|
|
148
|
+
else:
|
|
149
|
+
return json.dumps(self.actual_instance)
|
|
150
|
+
|
|
151
|
+
def to_dict(self) -> Optional[Union[Dict[str, Any], bool, float, str]]:
|
|
152
|
+
"""Returns the dict representation of the actual instance"""
|
|
153
|
+
if self.actual_instance is None:
|
|
154
|
+
return None
|
|
155
|
+
|
|
156
|
+
if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict):
|
|
157
|
+
return self.actual_instance.to_dict()
|
|
158
|
+
else:
|
|
159
|
+
# primitive type
|
|
160
|
+
return self.actual_instance
|
|
161
|
+
|
|
162
|
+
def to_str(self) -> str:
|
|
163
|
+
"""Returns the string representation of the actual instance"""
|
|
164
|
+
return pprint.pformat(self.model_dump())
|
|
165
|
+
|
|
166
|
+
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Adaline API
|
|
5
|
+
|
|
6
|
+
API for managing Adaline deployments, logs, and core type definitions.
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 1.0.0
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
import json
|
|
17
|
+
import pprint
|
|
18
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator
|
|
19
|
+
from typing import Any, List, Optional
|
|
20
|
+
from pydantic import StrictStr, Field
|
|
21
|
+
from typing import Union, List, Set, Optional, Dict
|
|
22
|
+
from typing_extensions import Literal, Self
|
|
23
|
+
|
|
24
|
+
RESPONSESCHEMAPROPERTYTYPE_ONE_OF_SCHEMAS = ["List[Optional[str]]", "str"]
|
|
25
|
+
|
|
26
|
+
class ResponseSchemaPropertyType(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
ResponseSchemaPropertyType
|
|
29
|
+
"""
|
|
30
|
+
# data type: str
|
|
31
|
+
oneof_schema_1_validator: Optional[StrictStr] = None
|
|
32
|
+
# data type: List[Optional[str]]
|
|
33
|
+
oneof_schema_2_validator: Optional[List[Optional[StrictStr]]] = None
|
|
34
|
+
actual_instance: Optional[Union[List[Optional[str]], str]] = None
|
|
35
|
+
one_of_schemas: Set[str] = { "List[Optional[str]]", "str" }
|
|
36
|
+
|
|
37
|
+
model_config = ConfigDict(
|
|
38
|
+
validate_assignment=True,
|
|
39
|
+
protected_namespaces=(),
|
|
40
|
+
)
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
def __init__(self, *args, **kwargs) -> None:
|
|
44
|
+
if args:
|
|
45
|
+
if len(args) > 1:
|
|
46
|
+
raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`")
|
|
47
|
+
if kwargs:
|
|
48
|
+
raise ValueError("If a position argument is used, keyword arguments cannot be used.")
|
|
49
|
+
super().__init__(actual_instance=args[0])
|
|
50
|
+
else:
|
|
51
|
+
super().__init__(**kwargs)
|
|
52
|
+
|
|
53
|
+
@field_validator('actual_instance')
|
|
54
|
+
def actual_instance_must_validate_oneof(cls, v):
|
|
55
|
+
instance = ResponseSchemaPropertyType.model_construct()
|
|
56
|
+
error_messages = []
|
|
57
|
+
match = 0
|
|
58
|
+
# validate data type: str
|
|
59
|
+
try:
|
|
60
|
+
instance.oneof_schema_1_validator = v
|
|
61
|
+
match += 1
|
|
62
|
+
except (ValidationError, ValueError) as e:
|
|
63
|
+
error_messages.append(str(e))
|
|
64
|
+
# validate data type: List[Optional[str]]
|
|
65
|
+
try:
|
|
66
|
+
instance.oneof_schema_2_validator = v
|
|
67
|
+
match += 1
|
|
68
|
+
except (ValidationError, ValueError) as e:
|
|
69
|
+
error_messages.append(str(e))
|
|
70
|
+
if match > 1:
|
|
71
|
+
# more than 1 match
|
|
72
|
+
raise ValueError("Multiple matches found when setting `actual_instance` in ResponseSchemaPropertyType with oneOf schemas: List[Optional[str]], str. Details: " + ", ".join(error_messages))
|
|
73
|
+
elif match == 0:
|
|
74
|
+
# no match
|
|
75
|
+
raise ValueError("No match found when setting `actual_instance` in ResponseSchemaPropertyType with oneOf schemas: List[Optional[str]], str. Details: " + ", ".join(error_messages))
|
|
76
|
+
else:
|
|
77
|
+
return v
|
|
78
|
+
|
|
79
|
+
@classmethod
|
|
80
|
+
def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self:
|
|
81
|
+
return cls.from_json(json.dumps(obj))
|
|
82
|
+
|
|
83
|
+
@classmethod
|
|
84
|
+
def from_json(cls, json_str: str) -> Self:
|
|
85
|
+
"""Returns the object represented by the json string"""
|
|
86
|
+
instance = cls.model_construct()
|
|
87
|
+
error_messages = []
|
|
88
|
+
match = 0
|
|
89
|
+
|
|
90
|
+
# deserialize data into str
|
|
91
|
+
try:
|
|
92
|
+
# validation
|
|
93
|
+
instance.oneof_schema_1_validator = json.loads(json_str)
|
|
94
|
+
# assign value to actual_instance
|
|
95
|
+
instance.actual_instance = instance.oneof_schema_1_validator
|
|
96
|
+
match += 1
|
|
97
|
+
except (ValidationError, ValueError) as e:
|
|
98
|
+
error_messages.append(str(e))
|
|
99
|
+
# deserialize data into List[Optional[str]]
|
|
100
|
+
try:
|
|
101
|
+
# validation
|
|
102
|
+
instance.oneof_schema_2_validator = json.loads(json_str)
|
|
103
|
+
# assign value to actual_instance
|
|
104
|
+
instance.actual_instance = instance.oneof_schema_2_validator
|
|
105
|
+
match += 1
|
|
106
|
+
except (ValidationError, ValueError) as e:
|
|
107
|
+
error_messages.append(str(e))
|
|
108
|
+
|
|
109
|
+
if match > 1:
|
|
110
|
+
# more than 1 match
|
|
111
|
+
raise ValueError("Multiple matches found when deserializing the JSON string into ResponseSchemaPropertyType with oneOf schemas: List[Optional[str]], str. Details: " + ", ".join(error_messages))
|
|
112
|
+
elif match == 0:
|
|
113
|
+
# no match
|
|
114
|
+
raise ValueError("No match found when deserializing the JSON string into ResponseSchemaPropertyType with oneOf schemas: List[Optional[str]], str. Details: " + ", ".join(error_messages))
|
|
115
|
+
else:
|
|
116
|
+
return instance
|
|
117
|
+
|
|
118
|
+
def to_json(self) -> str:
|
|
119
|
+
"""Returns the JSON representation of the actual instance"""
|
|
120
|
+
if self.actual_instance is None:
|
|
121
|
+
return "null"
|
|
122
|
+
|
|
123
|
+
if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json):
|
|
124
|
+
return self.actual_instance.to_json()
|
|
125
|
+
else:
|
|
126
|
+
return json.dumps(self.actual_instance)
|
|
127
|
+
|
|
128
|
+
def to_dict(self) -> Optional[Union[Dict[str, Any], List[Optional[str]], str]]:
|
|
129
|
+
"""Returns the dict representation of the actual instance"""
|
|
130
|
+
if self.actual_instance is None:
|
|
131
|
+
return None
|
|
132
|
+
|
|
133
|
+
if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict):
|
|
134
|
+
return self.actual_instance.to_dict()
|
|
135
|
+
else:
|
|
136
|
+
# primitive type
|
|
137
|
+
return self.actual_instance
|
|
138
|
+
|
|
139
|
+
def to_str(self) -> str:
|
|
140
|
+
"""Returns the string representation of the actual instance"""
|
|
141
|
+
return pprint.pformat(self.model_dump())
|
|
142
|
+
|
|
143
|
+
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Adaline API
|
|
5
|
+
|
|
6
|
+
API for managing Adaline deployments, logs, and core type definitions.
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 1.0.0
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
import json
|
|
17
|
+
import pprint
|
|
18
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr, ValidationError, field_validator
|
|
19
|
+
from typing import Any, List, Optional, Union
|
|
20
|
+
from pydantic import StrictStr, Field
|
|
21
|
+
from typing import Union, List, Set, Optional, Dict
|
|
22
|
+
from typing_extensions import Literal, Self
|
|
23
|
+
|
|
24
|
+
RESPONSESCHEMAPROPERTYTYPEENUMINNER_ONE_OF_SCHEMAS = ["bool", "float", "str"]
|
|
25
|
+
|
|
26
|
+
class ResponseSchemaPropertyTypeEnumInner(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
ResponseSchemaPropertyTypeEnumInner
|
|
29
|
+
"""
|
|
30
|
+
# data type: str
|
|
31
|
+
oneof_schema_1_validator: Optional[StrictStr] = None
|
|
32
|
+
# data type: float
|
|
33
|
+
oneof_schema_2_validator: Optional[Union[StrictFloat, StrictInt]] = None
|
|
34
|
+
# data type: bool
|
|
35
|
+
oneof_schema_3_validator: Optional[StrictBool] = None
|
|
36
|
+
actual_instance: Optional[Union[bool, float, str]] = None
|
|
37
|
+
one_of_schemas: Set[str] = { "bool", "float", "str" }
|
|
38
|
+
|
|
39
|
+
model_config = ConfigDict(
|
|
40
|
+
validate_assignment=True,
|
|
41
|
+
protected_namespaces=(),
|
|
42
|
+
)
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
def __init__(self, *args, **kwargs) -> None:
|
|
46
|
+
if args:
|
|
47
|
+
if len(args) > 1:
|
|
48
|
+
raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`")
|
|
49
|
+
if kwargs:
|
|
50
|
+
raise ValueError("If a position argument is used, keyword arguments cannot be used.")
|
|
51
|
+
super().__init__(actual_instance=args[0])
|
|
52
|
+
else:
|
|
53
|
+
super().__init__(**kwargs)
|
|
54
|
+
|
|
55
|
+
@field_validator('actual_instance')
|
|
56
|
+
def actual_instance_must_validate_oneof(cls, v):
|
|
57
|
+
if v is None:
|
|
58
|
+
return v
|
|
59
|
+
|
|
60
|
+
instance = ResponseSchemaPropertyTypeEnumInner.model_construct()
|
|
61
|
+
error_messages = []
|
|
62
|
+
match = 0
|
|
63
|
+
# validate data type: str
|
|
64
|
+
try:
|
|
65
|
+
instance.oneof_schema_1_validator = v
|
|
66
|
+
match += 1
|
|
67
|
+
except (ValidationError, ValueError) as e:
|
|
68
|
+
error_messages.append(str(e))
|
|
69
|
+
# validate data type: float
|
|
70
|
+
try:
|
|
71
|
+
instance.oneof_schema_2_validator = v
|
|
72
|
+
match += 1
|
|
73
|
+
except (ValidationError, ValueError) as e:
|
|
74
|
+
error_messages.append(str(e))
|
|
75
|
+
# validate data type: bool
|
|
76
|
+
try:
|
|
77
|
+
instance.oneof_schema_3_validator = v
|
|
78
|
+
match += 1
|
|
79
|
+
except (ValidationError, ValueError) as e:
|
|
80
|
+
error_messages.append(str(e))
|
|
81
|
+
if match > 1:
|
|
82
|
+
# more than 1 match
|
|
83
|
+
raise ValueError("Multiple matches found when setting `actual_instance` in ResponseSchemaPropertyTypeEnumInner with oneOf schemas: bool, float, str. Details: " + ", ".join(error_messages))
|
|
84
|
+
elif match == 0:
|
|
85
|
+
# no match
|
|
86
|
+
raise ValueError("No match found when setting `actual_instance` in ResponseSchemaPropertyTypeEnumInner with oneOf schemas: bool, float, str. Details: " + ", ".join(error_messages))
|
|
87
|
+
else:
|
|
88
|
+
return v
|
|
89
|
+
|
|
90
|
+
@classmethod
|
|
91
|
+
def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self:
|
|
92
|
+
return cls.from_json(json.dumps(obj))
|
|
93
|
+
|
|
94
|
+
@classmethod
|
|
95
|
+
def from_json(cls, json_str: Optional[str]) -> Self:
|
|
96
|
+
"""Returns the object represented by the json string"""
|
|
97
|
+
instance = cls.model_construct()
|
|
98
|
+
if json_str is None:
|
|
99
|
+
return instance
|
|
100
|
+
|
|
101
|
+
error_messages = []
|
|
102
|
+
match = 0
|
|
103
|
+
|
|
104
|
+
# deserialize data into str
|
|
105
|
+
try:
|
|
106
|
+
# validation
|
|
107
|
+
instance.oneof_schema_1_validator = json.loads(json_str)
|
|
108
|
+
# assign value to actual_instance
|
|
109
|
+
instance.actual_instance = instance.oneof_schema_1_validator
|
|
110
|
+
match += 1
|
|
111
|
+
except (ValidationError, ValueError) as e:
|
|
112
|
+
error_messages.append(str(e))
|
|
113
|
+
# deserialize data into float
|
|
114
|
+
try:
|
|
115
|
+
# validation
|
|
116
|
+
instance.oneof_schema_2_validator = json.loads(json_str)
|
|
117
|
+
# assign value to actual_instance
|
|
118
|
+
instance.actual_instance = instance.oneof_schema_2_validator
|
|
119
|
+
match += 1
|
|
120
|
+
except (ValidationError, ValueError) as e:
|
|
121
|
+
error_messages.append(str(e))
|
|
122
|
+
# deserialize data into bool
|
|
123
|
+
try:
|
|
124
|
+
# validation
|
|
125
|
+
instance.oneof_schema_3_validator = json.loads(json_str)
|
|
126
|
+
# assign value to actual_instance
|
|
127
|
+
instance.actual_instance = instance.oneof_schema_3_validator
|
|
128
|
+
match += 1
|
|
129
|
+
except (ValidationError, ValueError) as e:
|
|
130
|
+
error_messages.append(str(e))
|
|
131
|
+
|
|
132
|
+
if match > 1:
|
|
133
|
+
# more than 1 match
|
|
134
|
+
raise ValueError("Multiple matches found when deserializing the JSON string into ResponseSchemaPropertyTypeEnumInner with oneOf schemas: bool, float, str. Details: " + ", ".join(error_messages))
|
|
135
|
+
elif match == 0:
|
|
136
|
+
# no match
|
|
137
|
+
raise ValueError("No match found when deserializing the JSON string into ResponseSchemaPropertyTypeEnumInner with oneOf schemas: bool, float, str. Details: " + ", ".join(error_messages))
|
|
138
|
+
else:
|
|
139
|
+
return instance
|
|
140
|
+
|
|
141
|
+
def to_json(self) -> str:
|
|
142
|
+
"""Returns the JSON representation of the actual instance"""
|
|
143
|
+
if self.actual_instance is None:
|
|
144
|
+
return "null"
|
|
145
|
+
|
|
146
|
+
if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json):
|
|
147
|
+
return self.actual_instance.to_json()
|
|
148
|
+
else:
|
|
149
|
+
return json.dumps(self.actual_instance)
|
|
150
|
+
|
|
151
|
+
def to_dict(self) -> Optional[Union[Dict[str, Any], bool, float, str]]:
|
|
152
|
+
"""Returns the dict representation of the actual instance"""
|
|
153
|
+
if self.actual_instance is None:
|
|
154
|
+
return None
|
|
155
|
+
|
|
156
|
+
if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict):
|
|
157
|
+
return self.actual_instance.to_dict()
|
|
158
|
+
else:
|
|
159
|
+
# primitive type
|
|
160
|
+
return self.actual_instance
|
|
161
|
+
|
|
162
|
+
def to_str(self) -> str:
|
|
163
|
+
"""Returns the string representation of the actual instance"""
|
|
164
|
+
return pprint.pformat(self.model_dump())
|
|
165
|
+
|
|
166
|
+
|