platform-api-python-client 0.1.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.
Files changed (59) hide show
  1. platform_api_python_client/__init__.py +78 -0
  2. platform_api_python_client/api/__init__.py +5 -0
  3. platform_api_python_client/api/external_api.py +7341 -0
  4. platform_api_python_client/api_client.py +797 -0
  5. platform_api_python_client/api_response.py +21 -0
  6. platform_api_python_client/configuration.py +458 -0
  7. platform_api_python_client/exceptions.py +199 -0
  8. platform_api_python_client/models/__init__.py +61 -0
  9. platform_api_python_client/models/add_hardware_request.py +87 -0
  10. platform_api_python_client/models/api_key_request.py +87 -0
  11. platform_api_python_client/models/api_key_response.py +92 -0
  12. platform_api_python_client/models/c_serve_recipe_input.py +166 -0
  13. platform_api_python_client/models/c_serve_recipe_output.py +166 -0
  14. platform_api_python_client/models/c_serve_recipe_perf.py +98 -0
  15. platform_api_python_client/models/c_serve_recipe_response.py +105 -0
  16. platform_api_python_client/models/client_secret_response.py +87 -0
  17. platform_api_python_client/models/create_c_serve_deployment_request.py +117 -0
  18. platform_api_python_client/models/create_c_serve_deployment_response.py +92 -0
  19. platform_api_python_client/models/create_compute_deployment_response.py +94 -0
  20. platform_api_python_client/models/create_compute_deployment_v2_request.py +107 -0
  21. platform_api_python_client/models/create_inference_deployment_response.py +92 -0
  22. platform_api_python_client/models/create_inference_deployment_v2_request.py +141 -0
  23. platform_api_python_client/models/create_payment_request.py +89 -0
  24. platform_api_python_client/models/credits_response.py +87 -0
  25. platform_api_python_client/models/daily_bill_response.py +90 -0
  26. platform_api_python_client/models/deployment_status.py +38 -0
  27. platform_api_python_client/models/deployment_status_request.py +88 -0
  28. platform_api_python_client/models/deployment_status_response_v2.py +115 -0
  29. platform_api_python_client/models/deployment_type.py +43 -0
  30. platform_api_python_client/models/deployment_usage_value.py +89 -0
  31. platform_api_python_client/models/feedback_request.py +91 -0
  32. platform_api_python_client/models/get_c_serve_deployment_response.py +210 -0
  33. platform_api_python_client/models/get_cluster_response.py +89 -0
  34. platform_api_python_client/models/get_compute_v2_deployment_response.py +134 -0
  35. platform_api_python_client/models/get_deployment_log_response.py +94 -0
  36. platform_api_python_client/models/get_deployment_usage_response.py +95 -0
  37. platform_api_python_client/models/get_deployment_v2_response.py +111 -0
  38. platform_api_python_client/models/get_inference_v2_deployment_response.py +145 -0
  39. platform_api_python_client/models/hardware_instance_response.py +99 -0
  40. platform_api_python_client/models/health_status.py +40 -0
  41. platform_api_python_client/models/http_validation_error.py +95 -0
  42. platform_api_python_client/models/list_api_key_response.py +95 -0
  43. platform_api_python_client/models/list_c_serve_recipe_response.py +95 -0
  44. platform_api_python_client/models/list_daily_bill_response.py +95 -0
  45. platform_api_python_client/models/list_get_cluster_response.py +95 -0
  46. platform_api_python_client/models/list_get_deployment_v2_response.py +95 -0
  47. platform_api_python_client/models/list_hardware_instance_response.py +95 -0
  48. platform_api_python_client/models/list_payment_method_response.py +87 -0
  49. platform_api_python_client/models/list_prebuilt_image_response.py +95 -0
  50. platform_api_python_client/models/metric.py +38 -0
  51. platform_api_python_client/models/prebuilt_image_response.py +94 -0
  52. platform_api_python_client/models/validation_error.py +99 -0
  53. platform_api_python_client/models/validation_error_loc_inner.py +138 -0
  54. platform_api_python_client/py.typed +0 -0
  55. platform_api_python_client/rest.py +257 -0
  56. platform_api_python_client-0.1.0.dist-info/METADATA +16 -0
  57. platform_api_python_client-0.1.0.dist-info/RECORD +59 -0
  58. platform_api_python_client-0.1.0.dist-info/WHEEL +5 -0
  59. platform_api_python_client-0.1.0.dist-info/top_level.txt +1 -0
@@ -0,0 +1,107 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Platform External API
5
+
6
+ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
7
+
8
+ The version of the OpenAPI document: 0.1.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, StrictInt, 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 CreateComputeDeploymentV2Request(BaseModel):
26
+ """
27
+ CreateComputeDeploymentV2Request
28
+ """ # noqa: E501
29
+ name: StrictStr
30
+ cluster_id: StrictInt
31
+ hardware_instance_id: StrictInt
32
+ image_url: StrictStr
33
+ ssh_public_key: Optional[StrictStr] = None
34
+ ssh_password: Optional[StrictStr] = None
35
+ __properties: ClassVar[List[str]] = ["name", "cluster_id", "hardware_instance_id", "image_url", "ssh_public_key", "ssh_password"]
36
+
37
+ model_config = ConfigDict(
38
+ populate_by_name=True,
39
+ validate_assignment=True,
40
+ protected_namespaces=(),
41
+ )
42
+
43
+
44
+ def to_str(self) -> str:
45
+ """Returns the string representation of the model using alias"""
46
+ return pprint.pformat(self.model_dump(by_alias=True))
47
+
48
+ def to_json(self) -> str:
49
+ """Returns the JSON representation of the model using alias"""
50
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
51
+ return json.dumps(self.to_dict())
52
+
53
+ @classmethod
54
+ def from_json(cls, json_str: str) -> Optional[Self]:
55
+ """Create an instance of CreateComputeDeploymentV2Request from a JSON string"""
56
+ return cls.from_dict(json.loads(json_str))
57
+
58
+ def to_dict(self) -> Dict[str, Any]:
59
+ """Return the dictionary representation of the model using alias.
60
+
61
+ This has the following differences from calling pydantic's
62
+ `self.model_dump(by_alias=True)`:
63
+
64
+ * `None` is only added to the output dict for nullable fields that
65
+ were set at model initialization. Other fields with value `None`
66
+ are ignored.
67
+ """
68
+ excluded_fields: Set[str] = set([
69
+ ])
70
+
71
+ _dict = self.model_dump(
72
+ by_alias=True,
73
+ exclude=excluded_fields,
74
+ exclude_none=True,
75
+ )
76
+ # set to None if ssh_public_key (nullable) is None
77
+ # and model_fields_set contains the field
78
+ if self.ssh_public_key is None and "ssh_public_key" in self.model_fields_set:
79
+ _dict['ssh_public_key'] = None
80
+
81
+ # set to None if ssh_password (nullable) is None
82
+ # and model_fields_set contains the field
83
+ if self.ssh_password is None and "ssh_password" in self.model_fields_set:
84
+ _dict['ssh_password'] = None
85
+
86
+ return _dict
87
+
88
+ @classmethod
89
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
90
+ """Create an instance of CreateComputeDeploymentV2Request from a dict"""
91
+ if obj is None:
92
+ return None
93
+
94
+ if not isinstance(obj, dict):
95
+ return cls.model_validate(obj)
96
+
97
+ _obj = cls.model_validate({
98
+ "name": obj.get("name"),
99
+ "cluster_id": obj.get("cluster_id"),
100
+ "hardware_instance_id": obj.get("hardware_instance_id"),
101
+ "image_url": obj.get("image_url"),
102
+ "ssh_public_key": obj.get("ssh_public_key"),
103
+ "ssh_password": obj.get("ssh_password")
104
+ })
105
+ return _obj
106
+
107
+
@@ -0,0 +1,92 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Platform External API
5
+
6
+ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
7
+
8
+ The version of the OpenAPI document: 0.1.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 datetime import datetime
21
+ from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr
22
+ from typing import Any, ClassVar, Dict, List
23
+ from typing import Optional, Set
24
+ from typing_extensions import Self
25
+
26
+ class CreateInferenceDeploymentResponse(BaseModel):
27
+ """
28
+ CreateInferenceDeploymentResponse
29
+ """ # noqa: E501
30
+ id: StrictInt
31
+ created_at: datetime
32
+ endpoint_url: StrictStr
33
+ __properties: ClassVar[List[str]] = ["id", "created_at", "endpoint_url"]
34
+
35
+ model_config = ConfigDict(
36
+ populate_by_name=True,
37
+ validate_assignment=True,
38
+ protected_namespaces=(),
39
+ )
40
+
41
+
42
+ def to_str(self) -> str:
43
+ """Returns the string representation of the model using alias"""
44
+ return pprint.pformat(self.model_dump(by_alias=True))
45
+
46
+ def to_json(self) -> str:
47
+ """Returns the JSON representation of the model using alias"""
48
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
49
+ return json.dumps(self.to_dict())
50
+
51
+ @classmethod
52
+ def from_json(cls, json_str: str) -> Optional[Self]:
53
+ """Create an instance of CreateInferenceDeploymentResponse from a JSON string"""
54
+ return cls.from_dict(json.loads(json_str))
55
+
56
+ def to_dict(self) -> Dict[str, Any]:
57
+ """Return the dictionary representation of the model using alias.
58
+
59
+ This has the following differences from calling pydantic's
60
+ `self.model_dump(by_alias=True)`:
61
+
62
+ * `None` is only added to the output dict for nullable fields that
63
+ were set at model initialization. Other fields with value `None`
64
+ are ignored.
65
+ """
66
+ excluded_fields: Set[str] = set([
67
+ ])
68
+
69
+ _dict = self.model_dump(
70
+ by_alias=True,
71
+ exclude=excluded_fields,
72
+ exclude_none=True,
73
+ )
74
+ return _dict
75
+
76
+ @classmethod
77
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
78
+ """Create an instance of CreateInferenceDeploymentResponse from a dict"""
79
+ if obj is None:
80
+ return None
81
+
82
+ if not isinstance(obj, dict):
83
+ return cls.model_validate(obj)
84
+
85
+ _obj = cls.model_validate({
86
+ "id": obj.get("id"),
87
+ "created_at": obj.get("created_at"),
88
+ "endpoint_url": obj.get("endpoint_url")
89
+ })
90
+ return _obj
91
+
92
+
@@ -0,0 +1,141 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Platform External API
5
+
6
+ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
7
+
8
+ The version of the OpenAPI document: 0.1.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, StrictInt, 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 CreateInferenceDeploymentV2Request(BaseModel):
26
+ """
27
+ CreateInferenceDeploymentV2Request
28
+ """ # noqa: E501
29
+ name: StrictStr
30
+ cluster_id: StrictInt
31
+ hardware_instance_id: StrictInt
32
+ image_url: StrictStr
33
+ port: StrictInt
34
+ min_scale: StrictInt
35
+ max_scale: StrictInt
36
+ concurrency: Optional[StrictInt] = None
37
+ healthcheck: Optional[StrictStr] = None
38
+ env_vars: Optional[Dict[str, StrictStr]] = None
39
+ command: Optional[List[StrictStr]] = None
40
+ command_args: Optional[List[StrictStr]] = None
41
+ endpoint_certificate_authority: Optional[StrictStr] = None
42
+ __properties: ClassVar[List[str]] = ["name", "cluster_id", "hardware_instance_id", "image_url", "port", "min_scale", "max_scale", "concurrency", "healthcheck", "env_vars", "command", "command_args", "endpoint_certificate_authority"]
43
+
44
+ model_config = ConfigDict(
45
+ populate_by_name=True,
46
+ validate_assignment=True,
47
+ protected_namespaces=(),
48
+ )
49
+
50
+
51
+ def to_str(self) -> str:
52
+ """Returns the string representation of the model using alias"""
53
+ return pprint.pformat(self.model_dump(by_alias=True))
54
+
55
+ def to_json(self) -> str:
56
+ """Returns the JSON representation of the model using alias"""
57
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
58
+ return json.dumps(self.to_dict())
59
+
60
+ @classmethod
61
+ def from_json(cls, json_str: str) -> Optional[Self]:
62
+ """Create an instance of CreateInferenceDeploymentV2Request from a JSON string"""
63
+ return cls.from_dict(json.loads(json_str))
64
+
65
+ def to_dict(self) -> Dict[str, Any]:
66
+ """Return the dictionary representation of the model using alias.
67
+
68
+ This has the following differences from calling pydantic's
69
+ `self.model_dump(by_alias=True)`:
70
+
71
+ * `None` is only added to the output dict for nullable fields that
72
+ were set at model initialization. Other fields with value `None`
73
+ are ignored.
74
+ """
75
+ excluded_fields: Set[str] = set([
76
+ ])
77
+
78
+ _dict = self.model_dump(
79
+ by_alias=True,
80
+ exclude=excluded_fields,
81
+ exclude_none=True,
82
+ )
83
+ # set to None if concurrency (nullable) is None
84
+ # and model_fields_set contains the field
85
+ if self.concurrency is None and "concurrency" in self.model_fields_set:
86
+ _dict['concurrency'] = None
87
+
88
+ # set to None if healthcheck (nullable) is None
89
+ # and model_fields_set contains the field
90
+ if self.healthcheck is None and "healthcheck" in self.model_fields_set:
91
+ _dict['healthcheck'] = None
92
+
93
+ # set to None if env_vars (nullable) is None
94
+ # and model_fields_set contains the field
95
+ if self.env_vars is None and "env_vars" in self.model_fields_set:
96
+ _dict['env_vars'] = None
97
+
98
+ # set to None if command (nullable) is None
99
+ # and model_fields_set contains the field
100
+ if self.command is None and "command" in self.model_fields_set:
101
+ _dict['command'] = None
102
+
103
+ # set to None if command_args (nullable) is None
104
+ # and model_fields_set contains the field
105
+ if self.command_args is None and "command_args" in self.model_fields_set:
106
+ _dict['command_args'] = None
107
+
108
+ # set to None if endpoint_certificate_authority (nullable) is None
109
+ # and model_fields_set contains the field
110
+ if self.endpoint_certificate_authority is None and "endpoint_certificate_authority" in self.model_fields_set:
111
+ _dict['endpoint_certificate_authority'] = None
112
+
113
+ return _dict
114
+
115
+ @classmethod
116
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
117
+ """Create an instance of CreateInferenceDeploymentV2Request from a dict"""
118
+ if obj is None:
119
+ return None
120
+
121
+ if not isinstance(obj, dict):
122
+ return cls.model_validate(obj)
123
+
124
+ _obj = cls.model_validate({
125
+ "name": obj.get("name"),
126
+ "cluster_id": obj.get("cluster_id"),
127
+ "hardware_instance_id": obj.get("hardware_instance_id"),
128
+ "image_url": obj.get("image_url"),
129
+ "port": obj.get("port"),
130
+ "min_scale": obj.get("min_scale"),
131
+ "max_scale": obj.get("max_scale"),
132
+ "concurrency": obj.get("concurrency"),
133
+ "healthcheck": obj.get("healthcheck"),
134
+ "env_vars": obj.get("env_vars"),
135
+ "command": obj.get("command"),
136
+ "command_args": obj.get("command_args"),
137
+ "endpoint_certificate_authority": obj.get("endpoint_certificate_authority")
138
+ })
139
+ return _obj
140
+
141
+
@@ -0,0 +1,89 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Platform External API
5
+
6
+ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
7
+
8
+ The version of the OpenAPI document: 0.1.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, StrictInt, StrictStr
21
+ from typing import Any, ClassVar, Dict, List
22
+ from typing import Optional, Set
23
+ from typing_extensions import Self
24
+
25
+ class CreatePaymentRequest(BaseModel):
26
+ """
27
+ CreatePaymentRequest
28
+ """ # noqa: E501
29
+ amount: StrictInt
30
+ payment_method: StrictStr
31
+ __properties: ClassVar[List[str]] = ["amount", "payment_method"]
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 CreatePaymentRequest 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
+ return _dict
73
+
74
+ @classmethod
75
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
76
+ """Create an instance of CreatePaymentRequest from a dict"""
77
+ if obj is None:
78
+ return None
79
+
80
+ if not isinstance(obj, dict):
81
+ return cls.model_validate(obj)
82
+
83
+ _obj = cls.model_validate({
84
+ "amount": obj.get("amount"),
85
+ "payment_method": obj.get("payment_method")
86
+ })
87
+ return _obj
88
+
89
+
@@ -0,0 +1,87 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Platform External API
5
+
6
+ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
7
+
8
+ The version of the OpenAPI document: 0.1.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, StrictInt
21
+ from typing import Any, ClassVar, Dict, List
22
+ from typing import Optional, Set
23
+ from typing_extensions import Self
24
+
25
+ class CreditsResponse(BaseModel):
26
+ """
27
+ CreditsResponse
28
+ """ # noqa: E501
29
+ credits: StrictInt
30
+ __properties: ClassVar[List[str]] = ["credits"]
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 CreditsResponse 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 CreditsResponse 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
+ "credits": obj.get("credits")
84
+ })
85
+ return _obj
86
+
87
+
@@ -0,0 +1,90 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Platform External API
5
+
6
+ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
7
+
8
+ The version of the OpenAPI document: 0.1.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 datetime import date
21
+ from pydantic import BaseModel, ConfigDict, Field, StrictInt
22
+ from typing import Any, ClassVar, Dict, List
23
+ from typing import Optional, Set
24
+ from typing_extensions import Self
25
+
26
+ class DailyBillResponse(BaseModel):
27
+ """
28
+ DailyBillResponse
29
+ """ # noqa: E501
30
+ var_date: date = Field(alias="date")
31
+ credits: StrictInt
32
+ __properties: ClassVar[List[str]] = ["date", "credits"]
33
+
34
+ model_config = ConfigDict(
35
+ populate_by_name=True,
36
+ validate_assignment=True,
37
+ protected_namespaces=(),
38
+ )
39
+
40
+
41
+ def to_str(self) -> str:
42
+ """Returns the string representation of the model using alias"""
43
+ return pprint.pformat(self.model_dump(by_alias=True))
44
+
45
+ def to_json(self) -> str:
46
+ """Returns the JSON representation of the model using alias"""
47
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
48
+ return json.dumps(self.to_dict())
49
+
50
+ @classmethod
51
+ def from_json(cls, json_str: str) -> Optional[Self]:
52
+ """Create an instance of DailyBillResponse from a JSON string"""
53
+ return cls.from_dict(json.loads(json_str))
54
+
55
+ def to_dict(self) -> Dict[str, Any]:
56
+ """Return the dictionary representation of the model using alias.
57
+
58
+ This has the following differences from calling pydantic's
59
+ `self.model_dump(by_alias=True)`:
60
+
61
+ * `None` is only added to the output dict for nullable fields that
62
+ were set at model initialization. Other fields with value `None`
63
+ are ignored.
64
+ """
65
+ excluded_fields: Set[str] = set([
66
+ ])
67
+
68
+ _dict = self.model_dump(
69
+ by_alias=True,
70
+ exclude=excluded_fields,
71
+ exclude_none=True,
72
+ )
73
+ return _dict
74
+
75
+ @classmethod
76
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
77
+ """Create an instance of DailyBillResponse from a dict"""
78
+ if obj is None:
79
+ return None
80
+
81
+ if not isinstance(obj, dict):
82
+ return cls.model_validate(obj)
83
+
84
+ _obj = cls.model_validate({
85
+ "date": obj.get("date"),
86
+ "credits": obj.get("credits")
87
+ })
88
+ return _obj
89
+
90
+
@@ -0,0 +1,38 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Platform External API
5
+
6
+ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
7
+
8
+ The version of the OpenAPI document: 0.1.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
+ from enum import Enum
18
+ from typing_extensions import Self
19
+
20
+
21
+ class DeploymentStatus(str, Enum):
22
+ """
23
+ DeploymentStatus
24
+ """
25
+
26
+ """
27
+ allowed enum values
28
+ """
29
+ ACTIVE = 'active'
30
+ PAUSED = 'paused'
31
+ DELETED = 'deleted'
32
+
33
+ @classmethod
34
+ def from_json(cls, json_str: str) -> Self:
35
+ """Create an instance of DeploymentStatus from a JSON string"""
36
+ return cls(json.loads(json_str))
37
+
38
+