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,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, StrictStr
21
+ from typing import Any, ClassVar, Dict, List
22
+ from typing import Optional, Set
23
+ from typing_extensions import Self
24
+
25
+ class GetDeploymentPodsResponse(BaseModel):
26
+ """
27
+ GetDeploymentPodsResponse
28
+ """ # noqa: E501
29
+ pods: List[StrictStr]
30
+ __properties: ClassVar[List[str]] = ["pods"]
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 GetDeploymentPodsResponse 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 GetDeploymentPodsResponse 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
+ "pods": obj.get("pods")
84
+ })
85
+ return _obj
86
+
87
+
@@ -0,0 +1,193 @@
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, StrictBool, StrictInt, StrictStr
22
+ from typing import Any, ClassVar, Dict, List, Optional
23
+ from platform_api_python_client.models.backend_protocol import BackendProtocol
24
+ from platform_api_python_client.models.deployment_status import DeploymentStatus
25
+ from platform_api_python_client.models.deployment_type import DeploymentType
26
+ from platform_api_python_client.models.dynamo_serving_mode import DynamoServingMode
27
+ from platform_api_python_client.models.dynamo_worker_pools import DynamoWorkerPools
28
+ from typing import Optional, Set
29
+ from typing_extensions import Self
30
+
31
+ class GetDynamoDeploymentResponse(BaseModel):
32
+ """
33
+ GetDynamoDeploymentResponse
34
+ """ # noqa: E501
35
+ creator_email: StrictStr
36
+ cluster_id: StrictInt
37
+ id: StrictInt
38
+ name: StrictStr
39
+ endpoint_url: StrictStr
40
+ image_url: Optional[StrictStr] = None
41
+ type: DeploymentType
42
+ status: DeploymentStatus
43
+ created_at: datetime
44
+ hardware_instance_id: StrictInt
45
+ revision_number: StrictInt
46
+ user_annotations: Optional[Dict[str, StrictStr]] = None
47
+ serving_mode: Optional[DynamoServingMode] = None
48
+ worker_pools: Optional[DynamoWorkerPools] = None
49
+ model: StrictStr
50
+ served_model_name: Optional[StrictStr] = None
51
+ min_replicas: StrictInt
52
+ max_replicas: StrictInt
53
+ concurrency: Optional[StrictInt] = None
54
+ cooldown_period: Optional[StrictInt] = None
55
+ extra_args: Optional[StrictStr] = None
56
+ env_vars: Optional[Dict[str, StrictStr]] = None
57
+ endpoint_certificate_authority: Optional[StrictStr] = None
58
+ endpoint_bearer_token: Optional[StrictStr] = None
59
+ enable_logging: Optional[StrictBool] = True
60
+ enable_node_model_cache: Optional[StrictBool] = False
61
+ backend_protocol: Optional[BackendProtocol] = None
62
+ __properties: ClassVar[List[str]] = ["creator_email", "cluster_id", "id", "name", "endpoint_url", "image_url", "type", "status", "created_at", "hardware_instance_id", "revision_number", "user_annotations", "serving_mode", "worker_pools", "model", "served_model_name", "min_replicas", "max_replicas", "concurrency", "cooldown_period", "extra_args", "env_vars", "endpoint_certificate_authority", "endpoint_bearer_token", "enable_logging", "enable_node_model_cache", "backend_protocol"]
63
+
64
+ model_config = ConfigDict(
65
+ populate_by_name=True,
66
+ validate_assignment=True,
67
+ protected_namespaces=(),
68
+ )
69
+
70
+
71
+ def to_str(self) -> str:
72
+ """Returns the string representation of the model using alias"""
73
+ return pprint.pformat(self.model_dump(by_alias=True))
74
+
75
+ def to_json(self) -> str:
76
+ """Returns the JSON representation of the model using alias"""
77
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
78
+ return json.dumps(self.to_dict())
79
+
80
+ @classmethod
81
+ def from_json(cls, json_str: str) -> Optional[Self]:
82
+ """Create an instance of GetDynamoDeploymentResponse from a JSON string"""
83
+ return cls.from_dict(json.loads(json_str))
84
+
85
+ def to_dict(self) -> Dict[str, Any]:
86
+ """Return the dictionary representation of the model using alias.
87
+
88
+ This has the following differences from calling pydantic's
89
+ `self.model_dump(by_alias=True)`:
90
+
91
+ * `None` is only added to the output dict for nullable fields that
92
+ were set at model initialization. Other fields with value `None`
93
+ are ignored.
94
+ """
95
+ excluded_fields: Set[str] = set([
96
+ ])
97
+
98
+ _dict = self.model_dump(
99
+ by_alias=True,
100
+ exclude=excluded_fields,
101
+ exclude_none=True,
102
+ )
103
+ # override the default output from pydantic by calling `to_dict()` of worker_pools
104
+ if self.worker_pools:
105
+ _dict['worker_pools'] = self.worker_pools.to_dict()
106
+ # set to None if image_url (nullable) is None
107
+ # and model_fields_set contains the field
108
+ if self.image_url is None and "image_url" in self.model_fields_set:
109
+ _dict['image_url'] = None
110
+
111
+ # set to None if user_annotations (nullable) is None
112
+ # and model_fields_set contains the field
113
+ if self.user_annotations is None and "user_annotations" in self.model_fields_set:
114
+ _dict['user_annotations'] = None
115
+
116
+ # set to None if worker_pools (nullable) is None
117
+ # and model_fields_set contains the field
118
+ if self.worker_pools is None and "worker_pools" in self.model_fields_set:
119
+ _dict['worker_pools'] = None
120
+
121
+ # set to None if served_model_name (nullable) is None
122
+ # and model_fields_set contains the field
123
+ if self.served_model_name is None and "served_model_name" in self.model_fields_set:
124
+ _dict['served_model_name'] = None
125
+
126
+ # set to None if concurrency (nullable) is None
127
+ # and model_fields_set contains the field
128
+ if self.concurrency is None and "concurrency" in self.model_fields_set:
129
+ _dict['concurrency'] = None
130
+
131
+ # set to None if cooldown_period (nullable) is None
132
+ # and model_fields_set contains the field
133
+ if self.cooldown_period is None and "cooldown_period" in self.model_fields_set:
134
+ _dict['cooldown_period'] = None
135
+
136
+ # set to None if extra_args (nullable) is None
137
+ # and model_fields_set contains the field
138
+ if self.extra_args is None and "extra_args" in self.model_fields_set:
139
+ _dict['extra_args'] = None
140
+
141
+ # set to None if endpoint_certificate_authority (nullable) is None
142
+ # and model_fields_set contains the field
143
+ if self.endpoint_certificate_authority is None and "endpoint_certificate_authority" in self.model_fields_set:
144
+ _dict['endpoint_certificate_authority'] = None
145
+
146
+ # set to None if endpoint_bearer_token (nullable) is None
147
+ # and model_fields_set contains the field
148
+ if self.endpoint_bearer_token is None and "endpoint_bearer_token" in self.model_fields_set:
149
+ _dict['endpoint_bearer_token'] = None
150
+
151
+ return _dict
152
+
153
+ @classmethod
154
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
155
+ """Create an instance of GetDynamoDeploymentResponse from a dict"""
156
+ if obj is None:
157
+ return None
158
+
159
+ if not isinstance(obj, dict):
160
+ return cls.model_validate(obj)
161
+
162
+ _obj = cls.model_validate({
163
+ "creator_email": obj.get("creator_email"),
164
+ "cluster_id": obj.get("cluster_id"),
165
+ "id": obj.get("id"),
166
+ "name": obj.get("name"),
167
+ "endpoint_url": obj.get("endpoint_url"),
168
+ "image_url": obj.get("image_url"),
169
+ "type": obj.get("type"),
170
+ "status": obj.get("status"),
171
+ "created_at": obj.get("created_at"),
172
+ "hardware_instance_id": obj.get("hardware_instance_id"),
173
+ "revision_number": obj.get("revision_number"),
174
+ "user_annotations": obj.get("user_annotations"),
175
+ "serving_mode": obj.get("serving_mode"),
176
+ "worker_pools": DynamoWorkerPools.from_dict(obj["worker_pools"]) if obj.get("worker_pools") is not None else None,
177
+ "model": obj.get("model"),
178
+ "served_model_name": obj.get("served_model_name"),
179
+ "min_replicas": obj.get("min_replicas"),
180
+ "max_replicas": obj.get("max_replicas"),
181
+ "concurrency": obj.get("concurrency"),
182
+ "cooldown_period": obj.get("cooldown_period"),
183
+ "extra_args": obj.get("extra_args"),
184
+ "env_vars": obj.get("env_vars"),
185
+ "endpoint_certificate_authority": obj.get("endpoint_certificate_authority"),
186
+ "endpoint_bearer_token": obj.get("endpoint_bearer_token"),
187
+ "enable_logging": obj.get("enable_logging") if obj.get("enable_logging") is not None else True,
188
+ "enable_node_model_cache": obj.get("enable_node_model_cache") if obj.get("enable_node_model_cache") is not None else False,
189
+ "backend_protocol": obj.get("backend_protocol")
190
+ })
191
+ return _obj
192
+
193
+
@@ -25,9 +25,9 @@ from platform_api_python_client.models.volume_status import VolumeStatus
25
25
  from typing import Optional, Set
26
26
  from typing_extensions import Self
27
27
 
28
- class GetBlockVolumeResponse(BaseModel):
28
+ class GetFilesystemVolumeResponse(BaseModel):
29
29
  """
30
- GetBlockVolumeResponse
30
+ GetFilesystemVolumeResponse
31
31
  """ # noqa: E501
32
32
  id: StrictInt
33
33
  name: StrictStr
@@ -38,13 +38,14 @@ class GetBlockVolumeResponse(BaseModel):
38
38
  pvc_name: StrictStr
39
39
  created_at: datetime
40
40
  size_gb: StrictInt
41
- __properties: ClassVar[List[str]] = ["id", "name", "cluster_id", "backend", "access_mode", "status", "pvc_name", "created_at", "size_gb"]
41
+ storage_class: StrictStr
42
+ __properties: ClassVar[List[str]] = ["id", "name", "cluster_id", "backend", "access_mode", "status", "pvc_name", "created_at", "size_gb", "storage_class"]
42
43
 
43
44
  @field_validator('backend')
44
45
  def backend_validate_enum(cls, value):
45
46
  """Validates the enum"""
46
- if value not in set(['block']):
47
- raise ValueError("must be one of enum values ('block')")
47
+ if value not in set(['filesystem']):
48
+ raise ValueError("must be one of enum values ('filesystem')")
48
49
  return value
49
50
 
50
51
  model_config = ConfigDict(
@@ -65,7 +66,7 @@ class GetBlockVolumeResponse(BaseModel):
65
66
 
66
67
  @classmethod
67
68
  def from_json(cls, json_str: str) -> Optional[Self]:
68
- """Create an instance of GetBlockVolumeResponse from a JSON string"""
69
+ """Create an instance of GetFilesystemVolumeResponse from a JSON string"""
69
70
  return cls.from_dict(json.loads(json_str))
70
71
 
71
72
  def to_dict(self) -> Dict[str, Any]:
@@ -90,7 +91,7 @@ class GetBlockVolumeResponse(BaseModel):
90
91
 
91
92
  @classmethod
92
93
  def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
93
- """Create an instance of GetBlockVolumeResponse from a dict"""
94
+ """Create an instance of GetFilesystemVolumeResponse from a dict"""
94
95
  if obj is None:
95
96
  return None
96
97
 
@@ -106,7 +107,8 @@ class GetBlockVolumeResponse(BaseModel):
106
107
  "status": obj.get("status"),
107
108
  "pvc_name": obj.get("pvc_name"),
108
109
  "created_at": obj.get("created_at"),
109
- "size_gb": obj.get("size_gb")
110
+ "size_gb": obj.get("size_gb"),
111
+ "storage_class": obj.get("storage_class")
110
112
  })
111
113
  return _obj
112
114
 
@@ -17,24 +17,24 @@ import json
17
17
  import pprint
18
18
  from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator
19
19
  from typing import Any, List, Optional
20
- from platform_api_python_client.models.get_block_volume_response import GetBlockVolumeResponse
20
+ from platform_api_python_client.models.get_filesystem_volume_response import GetFilesystemVolumeResponse
21
21
  from platform_api_python_client.models.get_object_volume_response import GetObjectVolumeResponse
22
22
  from pydantic import StrictStr, Field
23
23
  from typing import Union, List, Set, Optional, Dict
24
24
  from typing_extensions import Literal, Self
25
25
 
26
- GETVOLUMERESPONSE_ONE_OF_SCHEMAS = ["GetBlockVolumeResponse", "GetObjectVolumeResponse"]
26
+ GETVOLUMERESPONSE_ONE_OF_SCHEMAS = ["GetFilesystemVolumeResponse", "GetObjectVolumeResponse"]
27
27
 
28
28
  class GetVolumeResponse(BaseModel):
29
29
  """
30
30
  GetVolumeResponse
31
31
  """
32
- # data type: GetBlockVolumeResponse
33
- oneof_schema_1_validator: Optional[GetBlockVolumeResponse] = None
32
+ # data type: GetFilesystemVolumeResponse
33
+ oneof_schema_1_validator: Optional[GetFilesystemVolumeResponse] = None
34
34
  # data type: GetObjectVolumeResponse
35
35
  oneof_schema_2_validator: Optional[GetObjectVolumeResponse] = None
36
- actual_instance: Optional[Union[GetBlockVolumeResponse, GetObjectVolumeResponse]] = None
37
- one_of_schemas: Set[str] = { "GetBlockVolumeResponse", "GetObjectVolumeResponse" }
36
+ actual_instance: Optional[Union[GetFilesystemVolumeResponse, GetObjectVolumeResponse]] = None
37
+ one_of_schemas: Set[str] = { "GetFilesystemVolumeResponse", "GetObjectVolumeResponse" }
38
38
 
39
39
  model_config = ConfigDict(
40
40
  validate_assignment=True,
@@ -60,9 +60,9 @@ class GetVolumeResponse(BaseModel):
60
60
  instance = GetVolumeResponse.model_construct()
61
61
  error_messages = []
62
62
  match = 0
63
- # validate data type: GetBlockVolumeResponse
64
- if not isinstance(v, GetBlockVolumeResponse):
65
- error_messages.append(f"Error! Input type `{type(v)}` is not `GetBlockVolumeResponse`")
63
+ # validate data type: GetFilesystemVolumeResponse
64
+ if not isinstance(v, GetFilesystemVolumeResponse):
65
+ error_messages.append(f"Error! Input type `{type(v)}` is not `GetFilesystemVolumeResponse`")
66
66
  else:
67
67
  match += 1
68
68
  # validate data type: GetObjectVolumeResponse
@@ -72,10 +72,10 @@ class GetVolumeResponse(BaseModel):
72
72
  match += 1
73
73
  if match > 1:
74
74
  # more than 1 match
75
- raise ValueError("Multiple matches found when setting `actual_instance` in GetVolumeResponse with oneOf schemas: GetBlockVolumeResponse, GetObjectVolumeResponse. Details: " + ", ".join(error_messages))
75
+ raise ValueError("Multiple matches found when setting `actual_instance` in GetVolumeResponse with oneOf schemas: GetFilesystemVolumeResponse, GetObjectVolumeResponse. Details: " + ", ".join(error_messages))
76
76
  elif match == 0:
77
77
  # no match
78
- raise ValueError("No match found when setting `actual_instance` in GetVolumeResponse with oneOf schemas: GetBlockVolumeResponse, GetObjectVolumeResponse. Details: " + ", ".join(error_messages))
78
+ raise ValueError("No match found when setting `actual_instance` in GetVolumeResponse with oneOf schemas: GetFilesystemVolumeResponse, GetObjectVolumeResponse. Details: " + ", ".join(error_messages))
79
79
  else:
80
80
  return v
81
81
 
@@ -90,9 +90,9 @@ class GetVolumeResponse(BaseModel):
90
90
  error_messages = []
91
91
  match = 0
92
92
 
93
- # deserialize data into GetBlockVolumeResponse
93
+ # deserialize data into GetFilesystemVolumeResponse
94
94
  try:
95
- instance.actual_instance = GetBlockVolumeResponse.from_json(json_str)
95
+ instance.actual_instance = GetFilesystemVolumeResponse.from_json(json_str)
96
96
  match += 1
97
97
  except (ValidationError, ValueError) as e:
98
98
  error_messages.append(str(e))
@@ -105,10 +105,10 @@ class GetVolumeResponse(BaseModel):
105
105
 
106
106
  if match > 1:
107
107
  # more than 1 match
108
- raise ValueError("Multiple matches found when deserializing the JSON string into GetVolumeResponse with oneOf schemas: GetBlockVolumeResponse, GetObjectVolumeResponse. Details: " + ", ".join(error_messages))
108
+ raise ValueError("Multiple matches found when deserializing the JSON string into GetVolumeResponse with oneOf schemas: GetFilesystemVolumeResponse, GetObjectVolumeResponse. Details: " + ", ".join(error_messages))
109
109
  elif match == 0:
110
110
  # no match
111
- raise ValueError("No match found when deserializing the JSON string into GetVolumeResponse with oneOf schemas: GetBlockVolumeResponse, GetObjectVolumeResponse. Details: " + ", ".join(error_messages))
111
+ raise ValueError("No match found when deserializing the JSON string into GetVolumeResponse with oneOf schemas: GetFilesystemVolumeResponse, GetObjectVolumeResponse. Details: " + ", ".join(error_messages))
112
112
  else:
113
113
  return instance
114
114
 
@@ -122,7 +122,7 @@ class GetVolumeResponse(BaseModel):
122
122
  else:
123
123
  return json.dumps(self.actual_instance)
124
124
 
125
- def to_dict(self) -> Optional[Union[Dict[str, Any], GetBlockVolumeResponse, GetObjectVolumeResponse]]:
125
+ def to_dict(self) -> Optional[Union[Dict[str, Any], GetFilesystemVolumeResponse, GetObjectVolumeResponse]]:
126
126
  """Returns the dict representation of the actual instance"""
127
127
  if self.actual_instance is None:
128
128
  return None
@@ -19,6 +19,7 @@ import json
19
19
 
20
20
  from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr
21
21
  from typing import Any, ClassVar, Dict, List, Optional
22
+ from platform_api_python_client.models.deployment_component_type import DeploymentComponentType
22
23
  from platform_api_python_client.models.pod_status import PodStatus
23
24
  from typing import Optional, Set
24
25
  from typing_extensions import Self
@@ -29,9 +30,10 @@ class PodDetails(BaseModel):
29
30
  """ # noqa: E501
30
31
  name: Optional[StrictStr] = None
31
32
  revision_number: Optional[StrictInt] = None
33
+ component_type: Optional[DeploymentComponentType] = None
32
34
  status: PodStatus
33
35
  error_message: Optional[StrictStr] = None
34
- __properties: ClassVar[List[str]] = ["name", "revision_number", "status", "error_message"]
36
+ __properties: ClassVar[List[str]] = ["name", "revision_number", "component_type", "status", "error_message"]
35
37
 
36
38
  model_config = ConfigDict(
37
39
  populate_by_name=True,
@@ -82,6 +84,11 @@ class PodDetails(BaseModel):
82
84
  if self.revision_number is None and "revision_number" in self.model_fields_set:
83
85
  _dict['revision_number'] = None
84
86
 
87
+ # set to None if component_type (nullable) is None
88
+ # and model_fields_set contains the field
89
+ if self.component_type is None and "component_type" in self.model_fields_set:
90
+ _dict['component_type'] = None
91
+
85
92
  # set to None if error_message (nullable) is None
86
93
  # and model_fields_set contains the field
87
94
  if self.error_message is None and "error_message" in self.model_fields_set:
@@ -101,6 +108,7 @@ class PodDetails(BaseModel):
101
108
  _obj = cls.model_validate({
102
109
  "name": obj.get("name"),
103
110
  "revision_number": obj.get("revision_number"),
111
+ "component_type": obj.get("component_type"),
104
112
  "status": obj.get("status"),
105
113
  "error_message": obj.get("error_message")
106
114
  })
@@ -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, StrictBool
21
+ from typing import Any, ClassVar, Dict, List
22
+ from typing import Optional, Set
23
+ from typing_extensions import Self
24
+
25
+ class UpdateClusterMetadataRequest(BaseModel):
26
+ """
27
+ UpdateClusterMetadataRequest
28
+ """ # noqa: E501
29
+ deployment_creation_disabled: StrictBool
30
+ __properties: ClassVar[List[str]] = ["deployment_creation_disabled"]
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 UpdateClusterMetadataRequest 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 UpdateClusterMetadataRequest 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
+ "deployment_creation_disabled": obj.get("deployment_creation_disabled")
84
+ })
85
+ return _obj
86
+
87
+
@@ -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
21
+ from typing import Any, ClassVar, Dict, List, Optional
22
+ from typing_extensions import Annotated
23
+ from platform_api_python_client.models.user_vault_type import UserVaultType
24
+ from platform_api_python_client.models.vault_scope import VaultScope
25
+ from typing import Optional, Set
26
+ from typing_extensions import Self
27
+
28
+ class UpsertUserVaultItemRequest(BaseModel):
29
+ """
30
+ Write model for PUT /user_vault, where the key and value rules are enforced.
31
+ """ # noqa: E501
32
+ id: Optional[Annotated[int, Field(strict=True, ge=1)]] = None
33
+ type: UserVaultType
34
+ key: Annotated[str, Field(min_length=1, strict=True, max_length=512)]
35
+ value: Annotated[str, Field(min_length=1, strict=True, max_length=4096)]
36
+ visibility: Optional[VaultScope] = None
37
+ __properties: ClassVar[List[str]] = ["id", "type", "key", "value", "visibility"]
38
+
39
+ model_config = ConfigDict(
40
+ populate_by_name=True,
41
+ validate_assignment=True,
42
+ protected_namespaces=(),
43
+ )
44
+
45
+
46
+ def to_str(self) -> str:
47
+ """Returns the string representation of the model using alias"""
48
+ return pprint.pformat(self.model_dump(by_alias=True))
49
+
50
+ def to_json(self) -> str:
51
+ """Returns the JSON representation of the model using alias"""
52
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
53
+ return json.dumps(self.to_dict())
54
+
55
+ @classmethod
56
+ def from_json(cls, json_str: str) -> Optional[Self]:
57
+ """Create an instance of UpsertUserVaultItemRequest from a JSON string"""
58
+ return cls.from_dict(json.loads(json_str))
59
+
60
+ def to_dict(self) -> Dict[str, Any]:
61
+ """Return the dictionary representation of the model using alias.
62
+
63
+ This has the following differences from calling pydantic's
64
+ `self.model_dump(by_alias=True)`:
65
+
66
+ * `None` is only added to the output dict for nullable fields that
67
+ were set at model initialization. Other fields with value `None`
68
+ are ignored.
69
+ """
70
+ excluded_fields: Set[str] = set([
71
+ ])
72
+
73
+ _dict = self.model_dump(
74
+ by_alias=True,
75
+ exclude=excluded_fields,
76
+ exclude_none=True,
77
+ )
78
+ # set to None if id (nullable) is None
79
+ # and model_fields_set contains the field
80
+ if self.id is None and "id" in self.model_fields_set:
81
+ _dict['id'] = None
82
+
83
+ return _dict
84
+
85
+ @classmethod
86
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
87
+ """Create an instance of UpsertUserVaultItemRequest from a dict"""
88
+ if obj is None:
89
+ return None
90
+
91
+ if not isinstance(obj, dict):
92
+ return cls.model_validate(obj)
93
+
94
+ _obj = cls.model_validate({
95
+ "id": obj.get("id"),
96
+ "type": obj.get("type"),
97
+ "key": obj.get("key"),
98
+ "value": obj.get("value"),
99
+ "visibility": obj.get("visibility")
100
+ })
101
+ return _obj
102
+
103
+