Skip to content

Commit 4a9d76a

Browse files
committed
sync with platform commit
1 parent 8cb5fda commit 4a9d76a

File tree

10 files changed

+36
-12
lines changed

10 files changed

+36
-12
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ No description provided (generated by Openapi Generator https://github.com/opena
44
This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
55

66
- API version: 3.1.4
7-
- Package version: 0.3.2
7+
- Package version: 3.1.4
88
- Generator version: 7.9.0
99
- Build package: org.openapitools.codegen.languages.PythonClientCodegen
1010

docs/GetClusterResponse.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ Name | Type | Description | Notes
77
------------ | ------------- | ------------- | -------------
88
**id** | **int** | |
99
**display_name** | **str** | |
10+
**region** | **str** | |
1011

1112
## Example
1213

docs/HardwareInstanceResponse.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ Name | Type | Description | Notes
1313
**memory** | **int** | |
1414
**cost_per_hr** | **int** | |
1515
**cluster_id** | **int** | |
16+
**provider** | **str** | |
17+
**num_accelerators** | **int** | |
1618

1719
## Example
1820

platform_api_python_client/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
""" # noqa: E501
1515

1616

17-
__version__ = "0.3.2"
17+
__version__ = "3.1.4"
1818

1919
# import apis into sdk package
2020
from platform_api_python_client.api.external_api import EXTERNALApi

platform_api_python_client/api_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ def __init__(
9090
self.default_headers[header_name] = header_value
9191
self.cookie = cookie
9292
# Set default User-Agent.
93-
self.user_agent = 'OpenAPI-Generator/0.3.2/python'
93+
self.user_agent = 'OpenAPI-Generator/3.1.4/python'
9494
self.client_side_validation = configuration.client_side_validation
9595

9696
def __enter__(self):

platform_api_python_client/configuration.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,7 @@ def to_debug_report(self):
392392
"OS: {env}\n"\
393393
"Python Version: {pyversion}\n"\
394394
"Version of the API: 3.1.4\n"\
395-
"SDK Package Version: 0.3.2".\
395+
"SDK Package Version: 3.1.4".\
396396
format(env=sys.platform, pyversion=sys.version)
397397

398398
def get_host_settings(self):

platform_api_python_client/models/get_cluster_response.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
import json
1919

2020
from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr
21-
from typing import Any, ClassVar, Dict, List
21+
from typing import Any, ClassVar, Dict, List, Optional
2222
from typing import Optional, Set
2323
from typing_extensions import Self
2424

@@ -28,7 +28,8 @@ class GetClusterResponse(BaseModel):
2828
""" # noqa: E501
2929
id: StrictInt
3030
display_name: StrictStr
31-
__properties: ClassVar[List[str]] = ["id", "display_name"]
31+
region: Optional[StrictStr]
32+
__properties: ClassVar[List[str]] = ["id", "display_name", "region"]
3233

3334
model_config = ConfigDict(
3435
populate_by_name=True,
@@ -69,6 +70,11 @@ def to_dict(self) -> Dict[str, Any]:
6970
exclude=excluded_fields,
7071
exclude_none=True,
7172
)
73+
# set to None if region (nullable) is None
74+
# and model_fields_set contains the field
75+
if self.region is None and "region" in self.model_fields_set:
76+
_dict['region'] = None
77+
7278
return _dict
7379

7480
@classmethod
@@ -82,7 +88,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
8288

8389
_obj = cls.model_validate({
8490
"id": obj.get("id"),
85-
"display_name": obj.get("display_name")
91+
"display_name": obj.get("display_name"),
92+
"region": obj.get("region")
8693
})
8794
return _obj
8895

platform_api_python_client/models/hardware_instance_response.py

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
import json
1919

2020
from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr
21-
from typing import Any, ClassVar, Dict, List
21+
from typing import Any, ClassVar, Dict, List, Optional
2222
from typing import Optional, Set
2323
from typing_extensions import Self
2424

@@ -34,7 +34,9 @@ class HardwareInstanceResponse(BaseModel):
3434
memory: StrictInt
3535
cost_per_hr: StrictInt
3636
cluster_id: StrictInt
37-
__properties: ClassVar[List[str]] = ["id", "name", "gpu_type", "num_gpu", "cpu", "memory", "cost_per_hr", "cluster_id"]
37+
provider: Optional[StrictStr]
38+
num_accelerators: Optional[StrictInt]
39+
__properties: ClassVar[List[str]] = ["id", "name", "gpu_type", "num_gpu", "cpu", "memory", "cost_per_hr", "cluster_id", "provider", "num_accelerators"]
3840

3941
model_config = ConfigDict(
4042
populate_by_name=True,
@@ -75,6 +77,16 @@ def to_dict(self) -> Dict[str, Any]:
7577
exclude=excluded_fields,
7678
exclude_none=True,
7779
)
80+
# set to None if provider (nullable) is None
81+
# and model_fields_set contains the field
82+
if self.provider is None and "provider" in self.model_fields_set:
83+
_dict['provider'] = None
84+
85+
# set to None if num_accelerators (nullable) is None
86+
# and model_fields_set contains the field
87+
if self.num_accelerators is None and "num_accelerators" in self.model_fields_set:
88+
_dict['num_accelerators'] = None
89+
7890
return _dict
7991

8092
@classmethod
@@ -94,7 +106,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
94106
"cpu": obj.get("cpu"),
95107
"memory": obj.get("memory"),
96108
"cost_per_hr": obj.get("cost_per_hr"),
97-
"cluster_id": obj.get("cluster_id")
109+
"cluster_id": obj.get("cluster_id"),
110+
"provider": obj.get("provider"),
111+
"num_accelerators": obj.get("num_accelerators")
98112
})
99113
return _obj
100114

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "platform_api_python_client"
3-
version = "0.3.2"
3+
version = "3.1.4"
44
description = "Platform External API"
55
authors = ["OpenAPI Generator Community <[email protected]>"]
66
license = "NoLicense"

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
# prerequisite: setuptools
2222
# http://pypi.python.org/pypi/setuptools
2323
NAME = "platform-api-python-client"
24-
VERSION = "0.3.2"
24+
VERSION = "3.1.4"
2525
PYTHON_REQUIRES = ">= 3.8"
2626
REQUIRES = [
2727
"urllib3 >= 1.25.3, < 3.0.0",

0 commit comments

Comments
 (0)