platform-api-python-client 4.20.0__py3-none-any.whl → 4.25.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 (34) hide show
  1. platform_api_python_client/__init__.py +18 -3
  2. platform_api_python_client/api/external_api.py +4443 -1858
  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 +17 -2
  6. platform_api_python_client/models/create_dynamo_deployment_request.py +205 -0
  7. platform_api_python_client/models/create_dynamo_deployment_response.py +92 -0
  8. platform_api_python_client/models/{create_block_volume_request.py → create_filesystem_volume_request.py} +25 -8
  9. platform_api_python_client/models/create_volume_request.py +16 -16
  10. platform_api_python_client/models/delete_user_vault_item_request.py +108 -0
  11. platform_api_python_client/models/deployment_component_type.py +42 -0
  12. platform_api_python_client/models/deployment_log_event_v4.py +91 -0
  13. platform_api_python_client/models/deployment_response.py +40 -10
  14. platform_api_python_client/models/deployment_type.py +1 -0
  15. platform_api_python_client/models/dynamo_serving_mode.py +37 -0
  16. platform_api_python_client/models/dynamo_worker_pool_config.py +103 -0
  17. platform_api_python_client/models/dynamo_worker_pools.py +109 -0
  18. platform_api_python_client/models/get_cluster_response.py +5 -3
  19. platform_api_python_client/models/get_deployment_log_v4_response.py +95 -0
  20. platform_api_python_client/models/get_deployment_pods_response.py +87 -0
  21. platform_api_python_client/models/get_dynamo_deployment_response.py +193 -0
  22. platform_api_python_client/models/{get_block_volume_response.py → get_filesystem_volume_response.py} +10 -8
  23. platform_api_python_client/models/get_volume_response.py +16 -16
  24. platform_api_python_client/models/pod_details.py +9 -1
  25. platform_api_python_client/models/update_cluster_metadata_request.py +87 -0
  26. platform_api_python_client/models/upsert_user_vault_item_request.py +103 -0
  27. platform_api_python_client/models/user_vault_item.py +6 -3
  28. platform_api_python_client/models/volume_access_mode.py +0 -1
  29. platform_api_python_client/models/volume_backend.py +37 -0
  30. platform_api_python_client/models/volume_status_response.py +108 -0
  31. {platform_api_python_client-4.20.0.dist-info → platform_api_python_client-4.25.0.dist-info}/METADATA +1 -1
  32. {platform_api_python_client-4.20.0.dist-info → platform_api_python_client-4.25.0.dist-info}/RECORD +34 -19
  33. {platform_api_python_client-4.20.0.dist-info → platform_api_python_client-4.25.0.dist-info}/WHEEL +1 -1
  34. {platform_api_python_client-4.20.0.dist-info → platform_api_python_client-4.25.0.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,42 @@
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 DeploymentComponentType(str, Enum):
22
+ """
23
+ DeploymentComponentType
24
+ """
25
+
26
+ """
27
+ allowed enum values
28
+ """
29
+ USER_MINUS_CONTAINER = 'user-container'
30
+ FRONTEND = 'frontend'
31
+ WORKER = 'worker'
32
+ PREFILL = 'prefill'
33
+ DECODE = 'decode'
34
+ PLANNER = 'planner'
35
+ EPP = 'epp'
36
+
37
+ @classmethod
38
+ def from_json(cls, json_str: str) -> Self:
39
+ """Create an instance of DeploymentComponentType from a JSON string"""
40
+ return cls(json.loads(json_str))
41
+
42
+
@@ -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, Field, 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 DeploymentLogEventV4(BaseModel):
26
+ """
27
+ DeploymentLogEventV4
28
+ """ # noqa: E501
29
+ id: StrictStr = Field(description="Stable event identity: '<nanosecond timestamp>-<content hash>'. Deduplication key for the re-deliveries of fetch_newer pages; its nanosecond prefix orders events (sorted insert for late arrivals, never append).")
30
+ timestamp: StrictInt = Field(description="Event timestamp in epoch milliseconds.")
31
+ message: StrictStr = Field(description="Raw log line as emitted by the container.")
32
+ __properties: ClassVar[List[str]] = ["id", "timestamp", "message"]
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 DeploymentLogEventV4 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 DeploymentLogEventV4 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
+ "id": obj.get("id"),
86
+ "timestamp": obj.get("timestamp"),
87
+ "message": obj.get("message")
88
+ })
89
+ return _obj
90
+
91
+
@@ -20,27 +20,33 @@ import re # noqa: F401
20
20
  from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator
21
21
  from typing import Optional
22
22
  from platform_api_python_client.models.get_c_serve_v3_deployment_response import GetCServeV3DeploymentResponse
23
+ from platform_api_python_client.models.get_compute_deployment_response import GetComputeDeploymentResponse
24
+ from platform_api_python_client.models.get_dynamo_deployment_response import GetDynamoDeploymentResponse
23
25
  from platform_api_python_client.models.get_inference_v3_deployment_response import GetInferenceV3DeploymentResponse
24
26
  from typing import Union, Any, List, Set, TYPE_CHECKING, Optional, Dict
25
27
  from typing_extensions import Literal, Self
26
28
  from pydantic import Field
27
29
 
28
- DEPLOYMENTRESPONSE_ANY_OF_SCHEMAS = ["GetCServeV3DeploymentResponse", "GetInferenceV3DeploymentResponse"]
30
+ DEPLOYMENTRESPONSE_ANY_OF_SCHEMAS = ["GetCServeV3DeploymentResponse", "GetComputeDeploymentResponse", "GetDynamoDeploymentResponse", "GetInferenceV3DeploymentResponse"]
29
31
 
30
32
  class DeploymentResponse(BaseModel):
31
33
  """
32
34
  DeploymentResponse
33
35
  """
34
36
 
37
+ # data type: GetDynamoDeploymentResponse
38
+ anyof_schema_1_validator: Optional[GetDynamoDeploymentResponse] = None
35
39
  # data type: GetCServeV3DeploymentResponse
36
- anyof_schema_1_validator: Optional[GetCServeV3DeploymentResponse] = None
40
+ anyof_schema_2_validator: Optional[GetCServeV3DeploymentResponse] = None
37
41
  # data type: GetInferenceV3DeploymentResponse
38
- anyof_schema_2_validator: Optional[GetInferenceV3DeploymentResponse] = None
42
+ anyof_schema_3_validator: Optional[GetInferenceV3DeploymentResponse] = None
43
+ # data type: GetComputeDeploymentResponse
44
+ anyof_schema_4_validator: Optional[GetComputeDeploymentResponse] = None
39
45
  if TYPE_CHECKING:
40
- actual_instance: Optional[Union[GetCServeV3DeploymentResponse, GetInferenceV3DeploymentResponse]] = None
46
+ actual_instance: Optional[Union[GetCServeV3DeploymentResponse, GetComputeDeploymentResponse, GetDynamoDeploymentResponse, GetInferenceV3DeploymentResponse]] = None
41
47
  else:
42
48
  actual_instance: Any = None
43
- any_of_schemas: Set[str] = { "GetCServeV3DeploymentResponse", "GetInferenceV3DeploymentResponse" }
49
+ any_of_schemas: Set[str] = { "GetCServeV3DeploymentResponse", "GetComputeDeploymentResponse", "GetDynamoDeploymentResponse", "GetInferenceV3DeploymentResponse" }
44
50
 
45
51
  model_config = {
46
52
  "validate_assignment": True,
@@ -61,6 +67,12 @@ class DeploymentResponse(BaseModel):
61
67
  def actual_instance_must_validate_anyof(cls, v):
62
68
  instance = DeploymentResponse.model_construct()
63
69
  error_messages = []
70
+ # validate data type: GetDynamoDeploymentResponse
71
+ if not isinstance(v, GetDynamoDeploymentResponse):
72
+ error_messages.append(f"Error! Input type `{type(v)}` is not `GetDynamoDeploymentResponse`")
73
+ else:
74
+ return v
75
+
64
76
  # validate data type: GetCServeV3DeploymentResponse
65
77
  if not isinstance(v, GetCServeV3DeploymentResponse):
66
78
  error_messages.append(f"Error! Input type `{type(v)}` is not `GetCServeV3DeploymentResponse`")
@@ -73,9 +85,15 @@ class DeploymentResponse(BaseModel):
73
85
  else:
74
86
  return v
75
87
 
88
+ # validate data type: GetComputeDeploymentResponse
89
+ if not isinstance(v, GetComputeDeploymentResponse):
90
+ error_messages.append(f"Error! Input type `{type(v)}` is not `GetComputeDeploymentResponse`")
91
+ else:
92
+ return v
93
+
76
94
  if error_messages:
77
95
  # no match
78
- raise ValueError("No match found when setting the actual_instance in DeploymentResponse with anyOf schemas: GetCServeV3DeploymentResponse, GetInferenceV3DeploymentResponse. Details: " + ", ".join(error_messages))
96
+ raise ValueError("No match found when setting the actual_instance in DeploymentResponse with anyOf schemas: GetCServeV3DeploymentResponse, GetComputeDeploymentResponse, GetDynamoDeploymentResponse, GetInferenceV3DeploymentResponse. Details: " + ", ".join(error_messages))
79
97
  else:
80
98
  return v
81
99
 
@@ -88,22 +106,34 @@ class DeploymentResponse(BaseModel):
88
106
  """Returns the object represented by the json string"""
89
107
  instance = cls.model_construct()
90
108
  error_messages = []
91
- # anyof_schema_1_validator: Optional[GetCServeV3DeploymentResponse] = None
109
+ # anyof_schema_1_validator: Optional[GetDynamoDeploymentResponse] = None
110
+ try:
111
+ instance.actual_instance = GetDynamoDeploymentResponse.from_json(json_str)
112
+ return instance
113
+ except (ValidationError, ValueError) as e:
114
+ error_messages.append(str(e))
115
+ # anyof_schema_2_validator: Optional[GetCServeV3DeploymentResponse] = None
92
116
  try:
93
117
  instance.actual_instance = GetCServeV3DeploymentResponse.from_json(json_str)
94
118
  return instance
95
119
  except (ValidationError, ValueError) as e:
96
120
  error_messages.append(str(e))
97
- # anyof_schema_2_validator: Optional[GetInferenceV3DeploymentResponse] = None
121
+ # anyof_schema_3_validator: Optional[GetInferenceV3DeploymentResponse] = None
98
122
  try:
99
123
  instance.actual_instance = GetInferenceV3DeploymentResponse.from_json(json_str)
100
124
  return instance
101
125
  except (ValidationError, ValueError) as e:
102
126
  error_messages.append(str(e))
127
+ # anyof_schema_4_validator: Optional[GetComputeDeploymentResponse] = None
128
+ try:
129
+ instance.actual_instance = GetComputeDeploymentResponse.from_json(json_str)
130
+ return instance
131
+ except (ValidationError, ValueError) as e:
132
+ error_messages.append(str(e))
103
133
 
104
134
  if error_messages:
105
135
  # no match
106
- raise ValueError("No match found when deserializing the JSON string into DeploymentResponse with anyOf schemas: GetCServeV3DeploymentResponse, GetInferenceV3DeploymentResponse. Details: " + ", ".join(error_messages))
136
+ raise ValueError("No match found when deserializing the JSON string into DeploymentResponse with anyOf schemas: GetCServeV3DeploymentResponse, GetComputeDeploymentResponse, GetDynamoDeploymentResponse, GetInferenceV3DeploymentResponse. Details: " + ", ".join(error_messages))
107
137
  else:
108
138
  return instance
109
139
 
@@ -117,7 +147,7 @@ class DeploymentResponse(BaseModel):
117
147
  else:
118
148
  return json.dumps(self.actual_instance)
119
149
 
120
- def to_dict(self) -> Optional[Union[Dict[str, Any], GetCServeV3DeploymentResponse, GetInferenceV3DeploymentResponse]]:
150
+ def to_dict(self) -> Optional[Union[Dict[str, Any], GetCServeV3DeploymentResponse, GetComputeDeploymentResponse, GetDynamoDeploymentResponse, GetInferenceV3DeploymentResponse]]:
121
151
  """Returns the dict representation of the actual instance"""
122
152
  if self.actual_instance is None:
123
153
  return None
@@ -39,6 +39,7 @@ class DeploymentType(str, Enum):
39
39
  DEPLOYMENT = 'deployment'
40
40
  RAG = 'rag'
41
41
  JOB = 'job'
42
+ DYNAMO = 'dynamo'
42
43
 
43
44
  @classmethod
44
45
  def from_json(cls, json_str: str) -> Self:
@@ -0,0 +1,37 @@
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 DynamoServingMode(str, Enum):
22
+ """
23
+ DynamoServingMode
24
+ """
25
+
26
+ """
27
+ allowed enum values
28
+ """
29
+ AGGREGATED = 'aggregated'
30
+ DISAGGREGATED = 'disaggregated'
31
+
32
+ @classmethod
33
+ def from_json(cls, json_str: str) -> Self:
34
+ """Create an instance of DynamoServingMode from a JSON string"""
35
+ return cls(json.loads(json_str))
36
+
37
+
@@ -0,0 +1,103 @@
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, StrictInt
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 DynamoWorkerPoolConfig(BaseModel):
27
+ """
28
+ DynamoWorkerPoolConfig
29
+ """ # noqa: E501
30
+ hardware_instance_id: StrictInt
31
+ replicas: Annotated[int, Field(strict=True, ge=1)]
32
+ additional_properties: Dict[str, Any] = {}
33
+ __properties: ClassVar[List[str]] = ["hardware_instance_id", "replicas"]
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 DynamoWorkerPoolConfig 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
+ * Fields in `self.additional_properties` are added to the output dict.
66
+ """
67
+ excluded_fields: Set[str] = set([
68
+ "additional_properties",
69
+ ])
70
+
71
+ _dict = self.model_dump(
72
+ by_alias=True,
73
+ exclude=excluded_fields,
74
+ exclude_none=True,
75
+ )
76
+ # puts key-value pairs in additional_properties in the top level
77
+ if self.additional_properties is not None:
78
+ for _key, _value in self.additional_properties.items():
79
+ _dict[_key] = _value
80
+
81
+ return _dict
82
+
83
+ @classmethod
84
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
85
+ """Create an instance of DynamoWorkerPoolConfig from a dict"""
86
+ if obj is None:
87
+ return None
88
+
89
+ if not isinstance(obj, dict):
90
+ return cls.model_validate(obj)
91
+
92
+ _obj = cls.model_validate({
93
+ "hardware_instance_id": obj.get("hardware_instance_id"),
94
+ "replicas": obj.get("replicas")
95
+ })
96
+ # store additional fields in additional_properties
97
+ for _key in obj.keys():
98
+ if _key not in cls.__properties:
99
+ _obj.additional_properties[_key] = obj.get(_key)
100
+
101
+ return _obj
102
+
103
+
@@ -0,0 +1,109 @@
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.dynamo_worker_pool_config import DynamoWorkerPoolConfig
23
+ from typing import Optional, Set
24
+ from typing_extensions import Self
25
+
26
+ class DynamoWorkerPools(BaseModel):
27
+ """
28
+ DynamoWorkerPools
29
+ """ # noqa: E501
30
+ prefill: DynamoWorkerPoolConfig
31
+ decode: DynamoWorkerPoolConfig
32
+ additional_properties: Dict[str, Any] = {}
33
+ __properties: ClassVar[List[str]] = ["prefill", "decode"]
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 DynamoWorkerPools 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
+ * Fields in `self.additional_properties` are added to the output dict.
66
+ """
67
+ excluded_fields: Set[str] = set([
68
+ "additional_properties",
69
+ ])
70
+
71
+ _dict = self.model_dump(
72
+ by_alias=True,
73
+ exclude=excluded_fields,
74
+ exclude_none=True,
75
+ )
76
+ # override the default output from pydantic by calling `to_dict()` of prefill
77
+ if self.prefill:
78
+ _dict['prefill'] = self.prefill.to_dict()
79
+ # override the default output from pydantic by calling `to_dict()` of decode
80
+ if self.decode:
81
+ _dict['decode'] = self.decode.to_dict()
82
+ # puts key-value pairs in additional_properties in the top level
83
+ if self.additional_properties is not None:
84
+ for _key, _value in self.additional_properties.items():
85
+ _dict[_key] = _value
86
+
87
+ return _dict
88
+
89
+ @classmethod
90
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
91
+ """Create an instance of DynamoWorkerPools from a dict"""
92
+ if obj is None:
93
+ return None
94
+
95
+ if not isinstance(obj, dict):
96
+ return cls.model_validate(obj)
97
+
98
+ _obj = cls.model_validate({
99
+ "prefill": DynamoWorkerPoolConfig.from_dict(obj["prefill"]) if obj.get("prefill") is not None else None,
100
+ "decode": DynamoWorkerPoolConfig.from_dict(obj["decode"]) if obj.get("decode") is not None else None
101
+ })
102
+ # store additional fields in additional_properties
103
+ for _key in obj.keys():
104
+ if _key not in cls.__properties:
105
+ _obj.additional_properties[_key] = obj.get(_key)
106
+
107
+ return _obj
108
+
109
+
@@ -17,7 +17,7 @@ import pprint
17
17
  import re # noqa: F401
18
18
  import json
19
19
 
20
- from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr
20
+ from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt, StrictStr
21
21
  from typing import Any, ClassVar, Dict, List, Optional
22
22
  from typing import Optional, Set
23
23
  from typing_extensions import Self
@@ -30,7 +30,8 @@ class GetClusterResponse(BaseModel):
30
30
  cluster_name: StrictStr
31
31
  display_name: StrictStr
32
32
  region: Optional[StrictStr] = None
33
- __properties: ClassVar[List[str]] = ["id", "cluster_name", "display_name", "region"]
33
+ deployment_creation_disabled: Optional[StrictBool] = False
34
+ __properties: ClassVar[List[str]] = ["id", "cluster_name", "display_name", "region", "deployment_creation_disabled"]
34
35
 
35
36
  model_config = ConfigDict(
36
37
  populate_by_name=True,
@@ -91,7 +92,8 @@ class GetClusterResponse(BaseModel):
91
92
  "id": obj.get("id"),
92
93
  "cluster_name": obj.get("cluster_name"),
93
94
  "display_name": obj.get("display_name"),
94
- "region": obj.get("region")
95
+ "region": obj.get("region"),
96
+ "deployment_creation_disabled": obj.get("deployment_creation_disabled") if obj.get("deployment_creation_disabled") is not None else False
95
97
  })
96
98
  return _obj
97
99
 
@@ -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, Field
21
+ from typing import Any, ClassVar, Dict, List
22
+ from platform_api_python_client.models.deployment_log_event_v4 import DeploymentLogEventV4
23
+ from typing import Optional, Set
24
+ from typing_extensions import Self
25
+
26
+ class GetDeploymentLogV4Response(BaseModel):
27
+ """
28
+ GetDeploymentLogV4Response
29
+ """ # noqa: E501
30
+ events: List[DeploymentLogEventV4] = Field(description="Log events, oldest first. Page boundaries are minted client-side from the events' timestamp field (see the endpoint description): an empty fetch_newer=false page means history is exhausted; an empty fetch_newer=true page means nothing new yet.")
31
+ __properties: ClassVar[List[str]] = ["events"]
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 GetDeploymentLogV4Response 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 events (list)
73
+ _items = []
74
+ if self.events:
75
+ for _item_events in self.events:
76
+ if _item_events:
77
+ _items.append(_item_events.to_dict())
78
+ _dict['events'] = _items
79
+ return _dict
80
+
81
+ @classmethod
82
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
83
+ """Create an instance of GetDeploymentLogV4Response 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
+ "events": [DeploymentLogEventV4.from_dict(_item) for _item in obj["events"]] if obj.get("events") is not None else None
92
+ })
93
+ return _obj
94
+
95
+