platform-api-python-client 4.25.0__py3-none-any.whl → 4.31.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 (41) hide show
  1. platform_api_python_client/__init__.py +11 -1
  2. platform_api_python_client/api/external_api.py +1786 -481
  3. platform_api_python_client/api_client.py +1 -1
  4. platform_api_python_client/configuration.py +1 -1
  5. platform_api_python_client/models/__init__.py +10 -0
  6. platform_api_python_client/models/cloud_provider.py +5 -0
  7. platform_api_python_client/models/create_c_serve_v3_deployment_request.py +18 -8
  8. platform_api_python_client/models/create_compute_deployment_request.py +18 -1
  9. platform_api_python_client/models/create_dynamo_deployment_request.py +56 -6
  10. platform_api_python_client/models/create_filesystem_volume_request.py +13 -0
  11. platform_api_python_client/models/create_inference_v3_deployment_request.py +18 -8
  12. platform_api_python_client/models/create_job_deployment_request.py +18 -1
  13. platform_api_python_client/models/create_object_volume_request.py +32 -19
  14. platform_api_python_client/models/deployment_response.py +21 -6
  15. platform_api_python_client/models/dynamo_communications_input.py +104 -0
  16. platform_api_python_client/models/dynamo_communications_output.py +104 -0
  17. platform_api_python_client/models/dynamo_kv_transfer_configuration.py +101 -0
  18. platform_api_python_client/models/dynamo_kv_transfer_policy.py +37 -0
  19. platform_api_python_client/models/dynamo_worker_pool_config.py +38 -5
  20. platform_api_python_client/models/dynamo_worker_pools.py +24 -4
  21. platform_api_python_client/models/get_c_serve_v2_deployment_response.py +25 -1
  22. platform_api_python_client/models/get_c_serve_v3_deployment_response.py +25 -8
  23. platform_api_python_client/models/get_compute_deployment_response.py +25 -1
  24. platform_api_python_client/models/get_deployment_response.py +26 -2
  25. platform_api_python_client/models/get_dynamo_deployment_response.py +47 -5
  26. platform_api_python_client/models/get_inference_deployment_response.py +25 -1
  27. platform_api_python_client/models/get_inference_v3_deployment_response.py +23 -6
  28. platform_api_python_client/models/get_job_deployment_response.py +25 -1
  29. platform_api_python_client/models/get_object_volume_response.py +2 -16
  30. platform_api_python_client/models/hardware_instance_response.py +1 -3
  31. platform_api_python_client/models/hardware_preset_response.py +96 -0
  32. platform_api_python_client/models/list_hardware_preset_response.py +95 -0
  33. platform_api_python_client/models/list_organization_gpu_quota_response.py +95 -0
  34. platform_api_python_client/models/organization_gpu_quota_request.py +88 -0
  35. platform_api_python_client/models/organization_gpu_quota_response.py +91 -0
  36. platform_api_python_client/models/validation_error.py +12 -3
  37. platform_api_python_client/models/volume_mount.py +92 -0
  38. {platform_api_python_client-4.25.0.dist-info → platform_api_python_client-4.31.0.dist-info}/METADATA +1 -1
  39. {platform_api_python_client-4.25.0.dist-info → platform_api_python_client-4.31.0.dist-info}/RECORD +41 -31
  40. {platform_api_python_client-4.25.0.dist-info → platform_api_python_client-4.31.0.dist-info}/WHEEL +0 -0
  41. {platform_api_python_client-4.25.0.dist-info → platform_api_python_client-4.31.0.dist-info}/top_level.txt +0 -0
@@ -32,10 +32,9 @@ class HardwareInstanceResponse(BaseModel):
32
32
  num_gpu: StrictInt
33
33
  cpu: StrictInt
34
34
  memory: StrictInt
35
- cost_per_hr: StrictInt
36
35
  cluster_id: StrictInt
37
36
  accelerator_memory: Optional[StrictInt] = None
38
- __properties: ClassVar[List[str]] = ["id", "name", "gpu_type", "num_gpu", "cpu", "memory", "cost_per_hr", "cluster_id", "accelerator_memory"]
37
+ __properties: ClassVar[List[str]] = ["id", "name", "gpu_type", "num_gpu", "cpu", "memory", "cluster_id", "accelerator_memory"]
39
38
 
40
39
  model_config = ConfigDict(
41
40
  populate_by_name=True,
@@ -99,7 +98,6 @@ class HardwareInstanceResponse(BaseModel):
99
98
  "num_gpu": obj.get("num_gpu"),
100
99
  "cpu": obj.get("cpu"),
101
100
  "memory": obj.get("memory"),
102
- "cost_per_hr": obj.get("cost_per_hr"),
103
101
  "cluster_id": obj.get("cluster_id"),
104
102
  "accelerator_memory": obj.get("accelerator_memory")
105
103
  })
@@ -0,0 +1,96 @@
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, StrictBool, 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 HardwarePresetResponse(BaseModel):
26
+ """
27
+ HardwarePresetResponse
28
+ """ # noqa: E501
29
+ gpu_type: StrictStr
30
+ accelerator_memory: Optional[StrictInt] = None
31
+ is_mig: StrictBool
32
+ __properties: ClassVar[List[str]] = ["gpu_type", "accelerator_memory", "is_mig"]
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 HardwarePresetResponse 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
+ # set to None if accelerator_memory (nullable) is None
74
+ # and model_fields_set contains the field
75
+ if self.accelerator_memory is None and "accelerator_memory" in self.model_fields_set:
76
+ _dict['accelerator_memory'] = None
77
+
78
+ return _dict
79
+
80
+ @classmethod
81
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
82
+ """Create an instance of HardwarePresetResponse from a dict"""
83
+ if obj is None:
84
+ return None
85
+
86
+ if not isinstance(obj, dict):
87
+ return cls.model_validate(obj)
88
+
89
+ _obj = cls.model_validate({
90
+ "gpu_type": obj.get("gpu_type"),
91
+ "accelerator_memory": obj.get("accelerator_memory"),
92
+ "is_mig": obj.get("is_mig")
93
+ })
94
+ return _obj
95
+
96
+
@@ -0,0 +1,95 @@
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
21
+ from typing import Any, ClassVar, Dict, List
22
+ from platform_api_python_client.models.hardware_preset_response import HardwarePresetResponse
23
+ from typing import Optional, Set
24
+ from typing_extensions import Self
25
+
26
+ class ListHardwarePresetResponse(BaseModel):
27
+ """
28
+ ListHardwarePresetResponse
29
+ """ # noqa: E501
30
+ results: List[HardwarePresetResponse]
31
+ __properties: ClassVar[List[str]] = ["results"]
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 ListHardwarePresetResponse 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 results (list)
73
+ _items = []
74
+ if self.results:
75
+ for _item_results in self.results:
76
+ if _item_results:
77
+ _items.append(_item_results.to_dict())
78
+ _dict['results'] = _items
79
+ return _dict
80
+
81
+ @classmethod
82
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
83
+ """Create an instance of ListHardwarePresetResponse 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
+ "results": [HardwarePresetResponse.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None
92
+ })
93
+ return _obj
94
+
95
+
@@ -0,0 +1,95 @@
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
21
+ from typing import Any, ClassVar, Dict, List
22
+ from platform_api_python_client.models.organization_gpu_quota_response import OrganizationGpuQuotaResponse
23
+ from typing import Optional, Set
24
+ from typing_extensions import Self
25
+
26
+ class ListOrganizationGpuQuotaResponse(BaseModel):
27
+ """
28
+ ListOrganizationGpuQuotaResponse
29
+ """ # noqa: E501
30
+ results: List[OrganizationGpuQuotaResponse]
31
+ __properties: ClassVar[List[str]] = ["results"]
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 ListOrganizationGpuQuotaResponse 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 results (list)
73
+ _items = []
74
+ if self.results:
75
+ for _item_results in self.results:
76
+ if _item_results:
77
+ _items.append(_item_results.to_dict())
78
+ _dict['results'] = _items
79
+ return _dict
80
+
81
+ @classmethod
82
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
83
+ """Create an instance of ListOrganizationGpuQuotaResponse 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
+ "results": [OrganizationGpuQuotaResponse.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None
92
+ })
93
+ return _obj
94
+
95
+
@@ -0,0 +1,88 @@
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, Field
21
+ from typing import Any, ClassVar, Dict, List
22
+ from typing_extensions import Annotated
23
+ from typing import Optional, Set
24
+ from typing_extensions import Self
25
+
26
+ class OrganizationGpuQuotaRequest(BaseModel):
27
+ """
28
+ OrganizationGpuQuotaRequest
29
+ """ # noqa: E501
30
+ gpu_quota: Annotated[int, Field(strict=True, ge=-1)]
31
+ __properties: ClassVar[List[str]] = ["gpu_quota"]
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 OrganizationGpuQuotaRequest 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 OrganizationGpuQuotaRequest 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
+ "gpu_quota": obj.get("gpu_quota")
85
+ })
86
+ return _obj
87
+
88
+
@@ -0,0 +1,91 @@
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 OrganizationGpuQuotaResponse(BaseModel):
26
+ """
27
+ OrganizationGpuQuotaResponse
28
+ """ # noqa: E501
29
+ organization_id: StrictInt
30
+ cluster_id: StrictInt
31
+ gpu_quota: StrictInt
32
+ __properties: ClassVar[List[str]] = ["organization_id", "cluster_id", "gpu_quota"]
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 OrganizationGpuQuotaResponse 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 OrganizationGpuQuotaResponse 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
+ "organization_id": obj.get("organization_id"),
86
+ "cluster_id": obj.get("cluster_id"),
87
+ "gpu_quota": obj.get("gpu_quota")
88
+ })
89
+ return _obj
90
+
91
+
@@ -18,7 +18,7 @@ import re # noqa: F401
18
18
  import json
19
19
 
20
20
  from pydantic import BaseModel, ConfigDict, StrictStr
21
- from typing import Any, ClassVar, Dict, List
21
+ from typing import Any, ClassVar, Dict, List, Optional
22
22
  from platform_api_python_client.models.validation_error_loc_inner import ValidationErrorLocInner
23
23
  from typing import Optional, Set
24
24
  from typing_extensions import Self
@@ -30,7 +30,9 @@ class ValidationError(BaseModel):
30
30
  loc: List[ValidationErrorLocInner]
31
31
  msg: StrictStr
32
32
  type: StrictStr
33
- __properties: ClassVar[List[str]] = ["loc", "msg", "type"]
33
+ input: Optional[Any] = None
34
+ ctx: Optional[Dict[str, Any]] = None
35
+ __properties: ClassVar[List[str]] = ["loc", "msg", "type", "input", "ctx"]
34
36
 
35
37
  model_config = ConfigDict(
36
38
  populate_by_name=True,
@@ -78,6 +80,11 @@ class ValidationError(BaseModel):
78
80
  if _item_loc:
79
81
  _items.append(_item_loc.to_dict())
80
82
  _dict['loc'] = _items
83
+ # set to None if input (nullable) is None
84
+ # and model_fields_set contains the field
85
+ if self.input is None and "input" in self.model_fields_set:
86
+ _dict['input'] = None
87
+
81
88
  return _dict
82
89
 
83
90
  @classmethod
@@ -92,7 +99,9 @@ class ValidationError(BaseModel):
92
99
  _obj = cls.model_validate({
93
100
  "loc": [ValidationErrorLocInner.from_dict(_item) for _item in obj["loc"]] if obj.get("loc") is not None else None,
94
101
  "msg": obj.get("msg"),
95
- "type": obj.get("type")
102
+ "type": obj.get("type"),
103
+ "input": obj.get("input"),
104
+ "ctx": obj.get("ctx")
96
105
  })
97
106
  return _obj
98
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 pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt
21
+ from typing import Any, ClassVar, Dict, List, Optional
22
+ from typing_extensions import Annotated
23
+ from typing import Optional, Set
24
+ from typing_extensions import Self
25
+
26
+ class VolumeMount(BaseModel):
27
+ """
28
+ VolumeMount
29
+ """ # noqa: E501
30
+ volume_id: StrictInt
31
+ mount_path: Annotated[str, Field(min_length=1, strict=True)]
32
+ read_only: Optional[StrictBool] = Field(default=False, description="Mount this attachment read-only. False does not override a read-only volume.")
33
+ __properties: ClassVar[List[str]] = ["volume_id", "mount_path", "read_only"]
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 VolumeMount 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 VolumeMount 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
+ "volume_id": obj.get("volume_id"),
87
+ "mount_path": obj.get("mount_path"),
88
+ "read_only": obj.get("read_only") if obj.get("read_only") is not None else False
89
+ })
90
+ return _obj
91
+
92
+
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: platform-api-python-client
3
- Version: 4.25.0
3
+ Version: 4.31.0
4
4
  Summary: Platform External API
5
5
  Home-page:
6
6
  Author: OpenAPI Generator community