eval-studio-client 1.2.0a1__py3-none-any.whl → 1.2.0a3__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.
Files changed (92) hide show
  1. eval_studio_client/api/__init__.py +21 -0
  2. eval_studio_client/api/api/__init__.py +1 -0
  3. eval_studio_client/api/api/dashboard_service_api.py +1134 -73
  4. eval_studio_client/api/api/info_service_api.py +240 -0
  5. eval_studio_client/api/api/test_service_api.py +1233 -172
  6. eval_studio_client/api/api/workflow_result_service_api.py +1075 -0
  7. eval_studio_client/api/api/workflow_service_api.py +1420 -101
  8. eval_studio_client/api/docs/DashboardServiceApi.md +272 -0
  9. eval_studio_client/api/docs/InfoServiceApi.md +63 -0
  10. eval_studio_client/api/docs/PerturbationServiceCreatePerturbationRequest.md +1 -1
  11. eval_studio_client/api/docs/TestServiceApi.md +268 -0
  12. eval_studio_client/api/docs/TestServiceGrantTestAccessRequest.md +30 -0
  13. eval_studio_client/api/docs/TestServiceRevokeTestAccessRequest.md +30 -0
  14. eval_studio_client/api/docs/V1CreatePerturbationResponse.md +1 -1
  15. eval_studio_client/api/docs/V1FindWorkflowsByCollectionIDResponse.md +29 -0
  16. eval_studio_client/api/docs/V1GetStatsResponse.md +29 -0
  17. eval_studio_client/api/docs/V1GetWorkflowResultCorpusPatchResponse.md +29 -0
  18. eval_studio_client/api/docs/V1GetWorkflowResultReportResponse.md +30 -0
  19. eval_studio_client/api/docs/V1GetWorkflowResultSummaryResponse.md +32 -0
  20. eval_studio_client/api/docs/V1GetWorkflowResultSystemPromptPatchResponse.md +29 -0
  21. eval_studio_client/api/docs/V1Info.md +2 -0
  22. eval_studio_client/api/docs/V1ListDashboardAccessResponse.md +29 -0
  23. eval_studio_client/api/docs/V1ListDashboardsSharedWithMeResponse.md +29 -0
  24. eval_studio_client/api/docs/V1ListTestAccessResponse.md +29 -0
  25. eval_studio_client/api/docs/V1ListTestsSharedWithMeResponse.md +29 -0
  26. eval_studio_client/api/docs/V1ListWorkflowAccessResponse.md +29 -0
  27. eval_studio_client/api/docs/V1ListWorkflowsSharedWithMeResponse.md +29 -0
  28. eval_studio_client/api/docs/V1Role.md +12 -0
  29. eval_studio_client/api/docs/V1RoleBinding.md +32 -0
  30. eval_studio_client/api/docs/V1Stats.md +32 -0
  31. eval_studio_client/api/docs/V1WorkflowResultArtifactType.md +12 -0
  32. eval_studio_client/api/docs/V1WorkflowResultReportFormat.md +11 -0
  33. eval_studio_client/api/docs/WorkflowResultServiceApi.md +282 -0
  34. eval_studio_client/api/docs/WorkflowServiceApi.md +340 -0
  35. eval_studio_client/api/docs/WorkflowServiceRevokeWorkflowAccessRequest.md +30 -0
  36. eval_studio_client/api/models/__init__.py +20 -0
  37. eval_studio_client/api/models/perturbation_service_create_perturbation_request.py +1 -1
  38. eval_studio_client/api/models/test_service_grant_test_access_request.py +90 -0
  39. eval_studio_client/api/models/test_service_revoke_test_access_request.py +90 -0
  40. eval_studio_client/api/models/v1_create_perturbation_response.py +1 -1
  41. eval_studio_client/api/models/v1_find_workflows_by_collection_id_response.py +95 -0
  42. eval_studio_client/api/models/v1_get_stats_response.py +91 -0
  43. eval_studio_client/api/models/v1_get_workflow_result_corpus_patch_response.py +87 -0
  44. eval_studio_client/api/models/v1_get_workflow_result_report_response.py +89 -0
  45. eval_studio_client/api/models/v1_get_workflow_result_summary_response.py +94 -0
  46. eval_studio_client/api/models/v1_get_workflow_result_system_prompt_patch_response.py +87 -0
  47. eval_studio_client/api/models/v1_info.py +6 -2
  48. eval_studio_client/api/models/v1_list_dashboard_access_response.py +95 -0
  49. eval_studio_client/api/models/v1_list_dashboards_shared_with_me_response.py +95 -0
  50. eval_studio_client/api/models/v1_list_test_access_response.py +95 -0
  51. eval_studio_client/api/models/v1_list_tests_shared_with_me_response.py +95 -0
  52. eval_studio_client/api/models/v1_list_workflow_access_response.py +95 -0
  53. eval_studio_client/api/models/v1_list_workflows_shared_with_me_response.py +95 -0
  54. eval_studio_client/api/models/v1_role.py +38 -0
  55. eval_studio_client/api/models/v1_role_binding.py +92 -0
  56. eval_studio_client/api/models/v1_stats.py +106 -0
  57. eval_studio_client/api/models/v1_workflow_node_type.py +1 -0
  58. eval_studio_client/api/models/v1_workflow_result_artifact_type.py +40 -0
  59. eval_studio_client/api/models/v1_workflow_result_report_format.py +37 -0
  60. eval_studio_client/api/models/workflow_service_revoke_workflow_access_request.py +90 -0
  61. eval_studio_client/api/test/test_dashboard_service_api.py +28 -0
  62. eval_studio_client/api/test/test_info_service_api.py +6 -0
  63. eval_studio_client/api/test/test_test_service_api.py +24 -0
  64. eval_studio_client/api/test/test_test_service_grant_test_access_request.py +52 -0
  65. eval_studio_client/api/test/test_test_service_revoke_test_access_request.py +52 -0
  66. eval_studio_client/api/test/test_v1_find_workflows_by_collection_id_response.py +95 -0
  67. eval_studio_client/api/test/test_v1_get_info_response.py +3 -1
  68. eval_studio_client/api/test/test_v1_get_stats_response.py +54 -0
  69. eval_studio_client/api/test/test_v1_get_workflow_result_corpus_patch_response.py +51 -0
  70. eval_studio_client/api/test/test_v1_get_workflow_result_report_response.py +54 -0
  71. eval_studio_client/api/test/test_v1_get_workflow_result_summary_response.py +58 -0
  72. eval_studio_client/api/test/test_v1_get_workflow_result_system_prompt_patch_response.py +51 -0
  73. eval_studio_client/api/test/test_v1_info.py +3 -1
  74. eval_studio_client/api/test/test_v1_list_dashboard_access_response.py +56 -0
  75. eval_studio_client/api/test/test_v1_list_dashboards_shared_with_me_response.py +69 -0
  76. eval_studio_client/api/test/test_v1_list_test_access_response.py +56 -0
  77. eval_studio_client/api/test/test_v1_list_tests_shared_with_me_response.py +70 -0
  78. eval_studio_client/api/test/test_v1_list_workflow_access_response.py +56 -0
  79. eval_studio_client/api/test/test_v1_list_workflows_shared_with_me_response.py +95 -0
  80. eval_studio_client/api/test/test_v1_role.py +33 -0
  81. eval_studio_client/api/test/test_v1_role_binding.py +53 -0
  82. eval_studio_client/api/test/test_v1_stats.py +53 -0
  83. eval_studio_client/api/test/test_v1_workflow_result_artifact_type.py +33 -0
  84. eval_studio_client/api/test/test_v1_workflow_result_report_format.py +33 -0
  85. eval_studio_client/api/test/test_workflow_result_service_api.py +59 -0
  86. eval_studio_client/api/test/test_workflow_service_api.py +35 -0
  87. eval_studio_client/api/test/test_workflow_service_revoke_workflow_access_request.py +52 -0
  88. eval_studio_client/gen/openapiv2/eval_studio.swagger.json +940 -13
  89. eval_studio_client/tests.py +3 -3
  90. {eval_studio_client-1.2.0a1.dist-info → eval_studio_client-1.2.0a3.dist-info}/METADATA +2 -1
  91. {eval_studio_client-1.2.0a1.dist-info → eval_studio_client-1.2.0a3.dist-info}/RECORD +92 -29
  92. {eval_studio_client-1.2.0a1.dist-info → eval_studio_client-1.2.0a3.dist-info}/WHEEL +0 -0
@@ -0,0 +1,94 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ ai/h2o/eval_studio/v1/insight.proto
5
+
6
+ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
7
+
8
+ The version of the OpenAPI document: version not set
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, StrictStr
21
+ from typing import Any, ClassVar, Dict, List, Optional
22
+ from eval_studio_client.api.models.v1_workflow_result_artifact_type import V1WorkflowResultArtifactType
23
+ from typing import Optional, Set
24
+ from typing_extensions import Self
25
+
26
+ class V1GetWorkflowResultSummaryResponse(BaseModel):
27
+ """
28
+ V1GetWorkflowResultSummaryResponse
29
+ """ # noqa: E501
30
+ intro: Optional[StrictStr] = Field(default=None, description="The 3x3x3 workflow summary: 3 summary sentences + 3 bullets with most serious highlights + 3 recommended actions sentences.")
31
+ bullets: Optional[List[StrictStr]] = None
32
+ actions: Optional[StrictStr] = None
33
+ artifact_types: Optional[List[V1WorkflowResultArtifactType]] = Field(default=None, alias="artifactTypes")
34
+ __properties: ClassVar[List[str]] = ["intro", "bullets", "actions", "artifactTypes"]
35
+
36
+ model_config = ConfigDict(
37
+ populate_by_name=True,
38
+ validate_assignment=True,
39
+ protected_namespaces=(),
40
+ )
41
+
42
+
43
+ def to_str(self) -> str:
44
+ """Returns the string representation of the model using alias"""
45
+ return pprint.pformat(self.model_dump(by_alias=True))
46
+
47
+ def to_json(self) -> str:
48
+ """Returns the JSON representation of the model using alias"""
49
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
50
+ return json.dumps(self.to_dict())
51
+
52
+ @classmethod
53
+ def from_json(cls, json_str: str) -> Optional[Self]:
54
+ """Create an instance of V1GetWorkflowResultSummaryResponse from a JSON string"""
55
+ return cls.from_dict(json.loads(json_str))
56
+
57
+ def to_dict(self) -> Dict[str, Any]:
58
+ """Return the dictionary representation of the model using alias.
59
+
60
+ This has the following differences from calling pydantic's
61
+ `self.model_dump(by_alias=True)`:
62
+
63
+ * `None` is only added to the output dict for nullable fields that
64
+ were set at model initialization. Other fields with value `None`
65
+ are ignored.
66
+ """
67
+ excluded_fields: Set[str] = set([
68
+ ])
69
+
70
+ _dict = self.model_dump(
71
+ by_alias=True,
72
+ exclude=excluded_fields,
73
+ exclude_none=True,
74
+ )
75
+ return _dict
76
+
77
+ @classmethod
78
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
79
+ """Create an instance of V1GetWorkflowResultSummaryResponse from a dict"""
80
+ if obj is None:
81
+ return None
82
+
83
+ if not isinstance(obj, dict):
84
+ return cls.model_validate(obj)
85
+
86
+ _obj = cls.model_validate({
87
+ "intro": obj.get("intro"),
88
+ "bullets": obj.get("bullets"),
89
+ "actions": obj.get("actions"),
90
+ "artifactTypes": obj.get("artifactTypes")
91
+ })
92
+ return _obj
93
+
94
+
@@ -0,0 +1,87 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ ai/h2o/eval_studio/v1/insight.proto
5
+
6
+ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
7
+
8
+ The version of the OpenAPI document: version not set
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, StrictStr
21
+ from typing import Any, ClassVar, Dict, List, Optional
22
+ from typing import Optional, Set
23
+ from typing_extensions import Self
24
+
25
+ class V1GetWorkflowResultSystemPromptPatchResponse(BaseModel):
26
+ """
27
+ V1GetWorkflowResultSystemPromptPatchResponse
28
+ """ # noqa: E501
29
+ patch_text: Optional[StrictStr] = Field(default=None, description="The system prompt patch workflow result content as a text string.", alias="patchText")
30
+ __properties: ClassVar[List[str]] = ["patchText"]
31
+
32
+ model_config = ConfigDict(
33
+ populate_by_name=True,
34
+ validate_assignment=True,
35
+ protected_namespaces=(),
36
+ )
37
+
38
+
39
+ def to_str(self) -> str:
40
+ """Returns the string representation of the model using alias"""
41
+ return pprint.pformat(self.model_dump(by_alias=True))
42
+
43
+ def to_json(self) -> str:
44
+ """Returns the JSON representation of the model using alias"""
45
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
46
+ return json.dumps(self.to_dict())
47
+
48
+ @classmethod
49
+ def from_json(cls, json_str: str) -> Optional[Self]:
50
+ """Create an instance of V1GetWorkflowResultSystemPromptPatchResponse from a JSON string"""
51
+ return cls.from_dict(json.loads(json_str))
52
+
53
+ def to_dict(self) -> Dict[str, Any]:
54
+ """Return the dictionary representation of the model using alias.
55
+
56
+ This has the following differences from calling pydantic's
57
+ `self.model_dump(by_alias=True)`:
58
+
59
+ * `None` is only added to the output dict for nullable fields that
60
+ were set at model initialization. Other fields with value `None`
61
+ are ignored.
62
+ """
63
+ excluded_fields: Set[str] = set([
64
+ ])
65
+
66
+ _dict = self.model_dump(
67
+ by_alias=True,
68
+ exclude=excluded_fields,
69
+ exclude_none=True,
70
+ )
71
+ return _dict
72
+
73
+ @classmethod
74
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
75
+ """Create an instance of V1GetWorkflowResultSystemPromptPatchResponse from a dict"""
76
+ if obj is None:
77
+ return None
78
+
79
+ if not isinstance(obj, dict):
80
+ return cls.model_validate(obj)
81
+
82
+ _obj = cls.model_validate({
83
+ "patchText": obj.get("patchText")
84
+ })
85
+ return _obj
86
+
87
+
@@ -36,7 +36,9 @@ class V1Info(BaseModel):
36
36
  preferred_llms_for_test_generation: Optional[List[StrictStr]] = Field(default=None, description="Ordered list of LLMs preferred for test generation. The value might be a regular expression.", alias="preferredLlmsForTestGeneration")
37
37
  h2o_cloud_url: Optional[StrictStr] = Field(default=None, description="The URL for the H2O Cloud host.", alias="h2oCloudUrl")
38
38
  public_instance: Optional[StrictBool] = Field(default=None, description="If the Eval Studio instance is public.", alias="publicInstance")
39
- __properties: ClassVar[List[str]] = ["baseUrl", "version", "oauth2LoginUrl", "oauth2LogoutUrl", "h2oGpteAllowlist", "h2oGpteClientVersion", "h2oSonarVersion", "preferredLlmsForTestGeneration", "h2oCloudUrl", "publicInstance"]
39
+ sharing_enabled: Optional[StrictBool] = Field(default=None, description="Whether the sharing capability is enabled.", alias="sharingEnabled")
40
+ experimental_features_enabled: Optional[StrictBool] = Field(default=None, description="Whether the experimental features are enabled.", alias="experimentalFeaturesEnabled")
41
+ __properties: ClassVar[List[str]] = ["baseUrl", "version", "oauth2LoginUrl", "oauth2LogoutUrl", "h2oGpteAllowlist", "h2oGpteClientVersion", "h2oSonarVersion", "preferredLlmsForTestGeneration", "h2oCloudUrl", "publicInstance", "sharingEnabled", "experimentalFeaturesEnabled"]
40
42
 
41
43
  model_config = ConfigDict(
42
44
  populate_by_name=True,
@@ -98,7 +100,9 @@ class V1Info(BaseModel):
98
100
  "h2oSonarVersion": obj.get("h2oSonarVersion"),
99
101
  "preferredLlmsForTestGeneration": obj.get("preferredLlmsForTestGeneration"),
100
102
  "h2oCloudUrl": obj.get("h2oCloudUrl"),
101
- "publicInstance": obj.get("publicInstance")
103
+ "publicInstance": obj.get("publicInstance"),
104
+ "sharingEnabled": obj.get("sharingEnabled"),
105
+ "experimentalFeaturesEnabled": obj.get("experimentalFeaturesEnabled")
102
106
  })
103
107
  return _obj
104
108
 
@@ -0,0 +1,95 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ ai/h2o/eval_studio/v1/insight.proto
5
+
6
+ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
7
+
8
+ The version of the OpenAPI document: version not set
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
21
+ from typing import Any, ClassVar, Dict, List, Optional
22
+ from eval_studio_client.api.models.v1_role_binding import V1RoleBinding
23
+ from typing import Optional, Set
24
+ from typing_extensions import Self
25
+
26
+ class V1ListDashboardAccessResponse(BaseModel):
27
+ """
28
+ V1ListDashboardAccessResponse
29
+ """ # noqa: E501
30
+ role_bindings: Optional[List[V1RoleBinding]] = Field(default=None, description="The RoleBindings for the Dashboard requested.", alias="roleBindings")
31
+ __properties: ClassVar[List[str]] = ["roleBindings"]
32
+
33
+ model_config = ConfigDict(
34
+ populate_by_name=True,
35
+ validate_assignment=True,
36
+ protected_namespaces=(),
37
+ )
38
+
39
+
40
+ def to_str(self) -> str:
41
+ """Returns the string representation of the model using alias"""
42
+ return pprint.pformat(self.model_dump(by_alias=True))
43
+
44
+ def to_json(self) -> str:
45
+ """Returns the JSON representation of the model using alias"""
46
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
47
+ return json.dumps(self.to_dict())
48
+
49
+ @classmethod
50
+ def from_json(cls, json_str: str) -> Optional[Self]:
51
+ """Create an instance of V1ListDashboardAccessResponse from a JSON string"""
52
+ return cls.from_dict(json.loads(json_str))
53
+
54
+ def to_dict(self) -> Dict[str, Any]:
55
+ """Return the dictionary representation of the model using alias.
56
+
57
+ This has the following differences from calling pydantic's
58
+ `self.model_dump(by_alias=True)`:
59
+
60
+ * `None` is only added to the output dict for nullable fields that
61
+ were set at model initialization. Other fields with value `None`
62
+ are ignored.
63
+ """
64
+ excluded_fields: Set[str] = set([
65
+ ])
66
+
67
+ _dict = self.model_dump(
68
+ by_alias=True,
69
+ exclude=excluded_fields,
70
+ exclude_none=True,
71
+ )
72
+ # override the default output from pydantic by calling `to_dict()` of each item in role_bindings (list)
73
+ _items = []
74
+ if self.role_bindings:
75
+ for _item in self.role_bindings:
76
+ if _item:
77
+ _items.append(_item.to_dict())
78
+ _dict['roleBindings'] = _items
79
+ return _dict
80
+
81
+ @classmethod
82
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
83
+ """Create an instance of V1ListDashboardAccessResponse from a dict"""
84
+ if obj is None:
85
+ return None
86
+
87
+ if not isinstance(obj, dict):
88
+ return cls.model_validate(obj)
89
+
90
+ _obj = cls.model_validate({
91
+ "roleBindings": [V1RoleBinding.from_dict(_item) for _item in obj["roleBindings"]] if obj.get("roleBindings") is not None else None
92
+ })
93
+ return _obj
94
+
95
+
@@ -0,0 +1,95 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ ai/h2o/eval_studio/v1/insight.proto
5
+
6
+ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
7
+
8
+ The version of the OpenAPI document: version not set
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
21
+ from typing import Any, ClassVar, Dict, List, Optional
22
+ from eval_studio_client.api.models.v1_dashboard import V1Dashboard
23
+ from typing import Optional, Set
24
+ from typing_extensions import Self
25
+
26
+ class V1ListDashboardsSharedWithMeResponse(BaseModel):
27
+ """
28
+ V1ListDashboardsSharedWithMeResponse
29
+ """ # noqa: E501
30
+ dashboards: Optional[List[V1Dashboard]] = Field(default=None, description="The Dashboards that match the request.")
31
+ __properties: ClassVar[List[str]] = ["dashboards"]
32
+
33
+ model_config = ConfigDict(
34
+ populate_by_name=True,
35
+ validate_assignment=True,
36
+ protected_namespaces=(),
37
+ )
38
+
39
+
40
+ def to_str(self) -> str:
41
+ """Returns the string representation of the model using alias"""
42
+ return pprint.pformat(self.model_dump(by_alias=True))
43
+
44
+ def to_json(self) -> str:
45
+ """Returns the JSON representation of the model using alias"""
46
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
47
+ return json.dumps(self.to_dict())
48
+
49
+ @classmethod
50
+ def from_json(cls, json_str: str) -> Optional[Self]:
51
+ """Create an instance of V1ListDashboardsSharedWithMeResponse from a JSON string"""
52
+ return cls.from_dict(json.loads(json_str))
53
+
54
+ def to_dict(self) -> Dict[str, Any]:
55
+ """Return the dictionary representation of the model using alias.
56
+
57
+ This has the following differences from calling pydantic's
58
+ `self.model_dump(by_alias=True)`:
59
+
60
+ * `None` is only added to the output dict for nullable fields that
61
+ were set at model initialization. Other fields with value `None`
62
+ are ignored.
63
+ """
64
+ excluded_fields: Set[str] = set([
65
+ ])
66
+
67
+ _dict = self.model_dump(
68
+ by_alias=True,
69
+ exclude=excluded_fields,
70
+ exclude_none=True,
71
+ )
72
+ # override the default output from pydantic by calling `to_dict()` of each item in dashboards (list)
73
+ _items = []
74
+ if self.dashboards:
75
+ for _item in self.dashboards:
76
+ if _item:
77
+ _items.append(_item.to_dict())
78
+ _dict['dashboards'] = _items
79
+ return _dict
80
+
81
+ @classmethod
82
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
83
+ """Create an instance of V1ListDashboardsSharedWithMeResponse from a dict"""
84
+ if obj is None:
85
+ return None
86
+
87
+ if not isinstance(obj, dict):
88
+ return cls.model_validate(obj)
89
+
90
+ _obj = cls.model_validate({
91
+ "dashboards": [V1Dashboard.from_dict(_item) for _item in obj["dashboards"]] if obj.get("dashboards") is not None else None
92
+ })
93
+ return _obj
94
+
95
+
@@ -0,0 +1,95 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ ai/h2o/eval_studio/v1/insight.proto
5
+
6
+ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
7
+
8
+ The version of the OpenAPI document: version not set
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
21
+ from typing import Any, ClassVar, Dict, List, Optional
22
+ from eval_studio_client.api.models.v1_role_binding import V1RoleBinding
23
+ from typing import Optional, Set
24
+ from typing_extensions import Self
25
+
26
+ class V1ListTestAccessResponse(BaseModel):
27
+ """
28
+ V1ListTestAccessResponse
29
+ """ # noqa: E501
30
+ role_bindings: Optional[List[V1RoleBinding]] = Field(default=None, description="The RoleBindings for the Test requested.", alias="roleBindings")
31
+ __properties: ClassVar[List[str]] = ["roleBindings"]
32
+
33
+ model_config = ConfigDict(
34
+ populate_by_name=True,
35
+ validate_assignment=True,
36
+ protected_namespaces=(),
37
+ )
38
+
39
+
40
+ def to_str(self) -> str:
41
+ """Returns the string representation of the model using alias"""
42
+ return pprint.pformat(self.model_dump(by_alias=True))
43
+
44
+ def to_json(self) -> str:
45
+ """Returns the JSON representation of the model using alias"""
46
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
47
+ return json.dumps(self.to_dict())
48
+
49
+ @classmethod
50
+ def from_json(cls, json_str: str) -> Optional[Self]:
51
+ """Create an instance of V1ListTestAccessResponse from a JSON string"""
52
+ return cls.from_dict(json.loads(json_str))
53
+
54
+ def to_dict(self) -> Dict[str, Any]:
55
+ """Return the dictionary representation of the model using alias.
56
+
57
+ This has the following differences from calling pydantic's
58
+ `self.model_dump(by_alias=True)`:
59
+
60
+ * `None` is only added to the output dict for nullable fields that
61
+ were set at model initialization. Other fields with value `None`
62
+ are ignored.
63
+ """
64
+ excluded_fields: Set[str] = set([
65
+ ])
66
+
67
+ _dict = self.model_dump(
68
+ by_alias=True,
69
+ exclude=excluded_fields,
70
+ exclude_none=True,
71
+ )
72
+ # override the default output from pydantic by calling `to_dict()` of each item in role_bindings (list)
73
+ _items = []
74
+ if self.role_bindings:
75
+ for _item in self.role_bindings:
76
+ if _item:
77
+ _items.append(_item.to_dict())
78
+ _dict['roleBindings'] = _items
79
+ return _dict
80
+
81
+ @classmethod
82
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
83
+ """Create an instance of V1ListTestAccessResponse from a dict"""
84
+ if obj is None:
85
+ return None
86
+
87
+ if not isinstance(obj, dict):
88
+ return cls.model_validate(obj)
89
+
90
+ _obj = cls.model_validate({
91
+ "roleBindings": [V1RoleBinding.from_dict(_item) for _item in obj["roleBindings"]] if obj.get("roleBindings") is not None else None
92
+ })
93
+ return _obj
94
+
95
+
@@ -0,0 +1,95 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ ai/h2o/eval_studio/v1/insight.proto
5
+
6
+ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
7
+
8
+ The version of the OpenAPI document: version not set
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
21
+ from typing import Any, ClassVar, Dict, List, Optional
22
+ from eval_studio_client.api.models.v1_test import V1Test
23
+ from typing import Optional, Set
24
+ from typing_extensions import Self
25
+
26
+ class V1ListTestsSharedWithMeResponse(BaseModel):
27
+ """
28
+ V1ListTestsSharedWithMeResponse
29
+ """ # noqa: E501
30
+ tests: Optional[List[V1Test]] = Field(default=None, description="The Tests that match the request.")
31
+ __properties: ClassVar[List[str]] = ["tests"]
32
+
33
+ model_config = ConfigDict(
34
+ populate_by_name=True,
35
+ validate_assignment=True,
36
+ protected_namespaces=(),
37
+ )
38
+
39
+
40
+ def to_str(self) -> str:
41
+ """Returns the string representation of the model using alias"""
42
+ return pprint.pformat(self.model_dump(by_alias=True))
43
+
44
+ def to_json(self) -> str:
45
+ """Returns the JSON representation of the model using alias"""
46
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
47
+ return json.dumps(self.to_dict())
48
+
49
+ @classmethod
50
+ def from_json(cls, json_str: str) -> Optional[Self]:
51
+ """Create an instance of V1ListTestsSharedWithMeResponse from a JSON string"""
52
+ return cls.from_dict(json.loads(json_str))
53
+
54
+ def to_dict(self) -> Dict[str, Any]:
55
+ """Return the dictionary representation of the model using alias.
56
+
57
+ This has the following differences from calling pydantic's
58
+ `self.model_dump(by_alias=True)`:
59
+
60
+ * `None` is only added to the output dict for nullable fields that
61
+ were set at model initialization. Other fields with value `None`
62
+ are ignored.
63
+ """
64
+ excluded_fields: Set[str] = set([
65
+ ])
66
+
67
+ _dict = self.model_dump(
68
+ by_alias=True,
69
+ exclude=excluded_fields,
70
+ exclude_none=True,
71
+ )
72
+ # override the default output from pydantic by calling `to_dict()` of each item in tests (list)
73
+ _items = []
74
+ if self.tests:
75
+ for _item in self.tests:
76
+ if _item:
77
+ _items.append(_item.to_dict())
78
+ _dict['tests'] = _items
79
+ return _dict
80
+
81
+ @classmethod
82
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
83
+ """Create an instance of V1ListTestsSharedWithMeResponse from a dict"""
84
+ if obj is None:
85
+ return None
86
+
87
+ if not isinstance(obj, dict):
88
+ return cls.model_validate(obj)
89
+
90
+ _obj = cls.model_validate({
91
+ "tests": [V1Test.from_dict(_item) for _item in obj["tests"]] if obj.get("tests") is not None else None
92
+ })
93
+ return _obj
94
+
95
+
@@ -0,0 +1,95 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ ai/h2o/eval_studio/v1/insight.proto
5
+
6
+ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
7
+
8
+ The version of the OpenAPI document: version not set
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
21
+ from typing import Any, ClassVar, Dict, List, Optional
22
+ from eval_studio_client.api.models.v1_role_binding import V1RoleBinding
23
+ from typing import Optional, Set
24
+ from typing_extensions import Self
25
+
26
+ class V1ListWorkflowAccessResponse(BaseModel):
27
+ """
28
+ V1ListWorkflowAccessResponse
29
+ """ # noqa: E501
30
+ role_bindings: Optional[List[V1RoleBinding]] = Field(default=None, description="The RoleBindings for the Workflow requested.", alias="roleBindings")
31
+ __properties: ClassVar[List[str]] = ["roleBindings"]
32
+
33
+ model_config = ConfigDict(
34
+ populate_by_name=True,
35
+ validate_assignment=True,
36
+ protected_namespaces=(),
37
+ )
38
+
39
+
40
+ def to_str(self) -> str:
41
+ """Returns the string representation of the model using alias"""
42
+ return pprint.pformat(self.model_dump(by_alias=True))
43
+
44
+ def to_json(self) -> str:
45
+ """Returns the JSON representation of the model using alias"""
46
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
47
+ return json.dumps(self.to_dict())
48
+
49
+ @classmethod
50
+ def from_json(cls, json_str: str) -> Optional[Self]:
51
+ """Create an instance of V1ListWorkflowAccessResponse from a JSON string"""
52
+ return cls.from_dict(json.loads(json_str))
53
+
54
+ def to_dict(self) -> Dict[str, Any]:
55
+ """Return the dictionary representation of the model using alias.
56
+
57
+ This has the following differences from calling pydantic's
58
+ `self.model_dump(by_alias=True)`:
59
+
60
+ * `None` is only added to the output dict for nullable fields that
61
+ were set at model initialization. Other fields with value `None`
62
+ are ignored.
63
+ """
64
+ excluded_fields: Set[str] = set([
65
+ ])
66
+
67
+ _dict = self.model_dump(
68
+ by_alias=True,
69
+ exclude=excluded_fields,
70
+ exclude_none=True,
71
+ )
72
+ # override the default output from pydantic by calling `to_dict()` of each item in role_bindings (list)
73
+ _items = []
74
+ if self.role_bindings:
75
+ for _item in self.role_bindings:
76
+ if _item:
77
+ _items.append(_item.to_dict())
78
+ _dict['roleBindings'] = _items
79
+ return _dict
80
+
81
+ @classmethod
82
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
83
+ """Create an instance of V1ListWorkflowAccessResponse from a dict"""
84
+ if obj is None:
85
+ return None
86
+
87
+ if not isinstance(obj, dict):
88
+ return cls.model_validate(obj)
89
+
90
+ _obj = cls.model_validate({
91
+ "roleBindings": [V1RoleBinding.from_dict(_item) for _item in obj["roleBindings"]] if obj.get("roleBindings") is not None else None
92
+ })
93
+ return _obj
94
+
95
+