platform-api-python-client 4.15.0__py3-none-any.whl → 4.23.1__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 (68) hide show
  1. platform_api_python_client/__init__.py +50 -3
  2. platform_api_python_client/api/external_api.py +5460 -1700
  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 +49 -2
  6. platform_api_python_client/models/argo_rollouts.py +89 -0
  7. platform_api_python_client/models/cert_manager.py +89 -0
  8. platform_api_python_client/models/cloud_provider.py +39 -0
  9. platform_api_python_client/models/cluster_components.py +193 -0
  10. platform_api_python_client/models/cluster_config.py +91 -0
  11. platform_api_python_client/models/cluster_credential.py +91 -0
  12. platform_api_python_client/models/cluster_registration_request.py +110 -0
  13. platform_api_python_client/models/{create_url_response.py → cluster_registration_response.py} +8 -9
  14. platform_api_python_client/models/create_block_volume_request.py +125 -0
  15. platform_api_python_client/models/create_c_serve_v3_deployment_request.py +3 -1
  16. platform_api_python_client/models/create_compute_deployment_request.py +14 -3
  17. platform_api_python_client/models/create_compute_deployment_response.py +3 -10
  18. platform_api_python_client/models/create_dynamo_deployment_request.py +186 -0
  19. platform_api_python_client/models/create_dynamo_deployment_response.py +92 -0
  20. platform_api_python_client/models/create_inference_v3_deployment_request.py +3 -1
  21. platform_api_python_client/models/create_job_deployment_request.py +15 -2
  22. platform_api_python_client/models/create_object_volume_request.py +136 -0
  23. platform_api_python_client/models/create_service_account_request.py +97 -0
  24. platform_api_python_client/models/create_service_account_response.py +120 -0
  25. platform_api_python_client/models/create_volume_request.py +140 -0
  26. platform_api_python_client/models/deployment_component_type.py +40 -0
  27. platform_api_python_client/models/deployment_response.py +25 -10
  28. platform_api_python_client/models/deployment_type.py +1 -0
  29. platform_api_python_client/models/external_dns.py +89 -0
  30. platform_api_python_client/models/final_stack.py +89 -0
  31. platform_api_python_client/models/fluent_bit.py +89 -0
  32. platform_api_python_client/models/{create_url_request.py → generate_service_account_secret_response.py} +7 -9
  33. platform_api_python_client/models/get_block_volume_response.py +115 -0
  34. platform_api_python_client/models/get_compute_deployment_response.py +12 -1
  35. platform_api_python_client/models/get_dynamo_deployment_response.py +179 -0
  36. platform_api_python_client/models/get_job_deployment_response.py +13 -2
  37. platform_api_python_client/models/get_object_volume_response.py +141 -0
  38. platform_api_python_client/models/get_volume_response.py +140 -0
  39. platform_api_python_client/models/gpu_operator.py +89 -0
  40. platform_api_python_client/models/ingress_nginx.py +89 -0
  41. platform_api_python_client/models/istio.py +98 -0
  42. platform_api_python_client/models/istio_cni_overrides.py +99 -0
  43. platform_api_python_client/models/istio_cni_subchart_overrides.py +96 -0
  44. platform_api_python_client/models/istio_overrides.py +96 -0
  45. platform_api_python_client/models/keda.py +89 -0
  46. platform_api_python_client/models/kube_prometheus_stack.py +89 -0
  47. platform_api_python_client/models/list_service_accounts_response.py +95 -0
  48. platform_api_python_client/models/list_volumes_response.py +95 -0
  49. platform_api_python_client/models/longhorn.py +89 -0
  50. platform_api_python_client/models/metrics_server.py +89 -0
  51. platform_api_python_client/models/network_operator.py +89 -0
  52. platform_api_python_client/models/object_storage_provider.py +36 -0
  53. platform_api_python_client/models/opentelemetry_collector.py +89 -0
  54. platform_api_python_client/models/pod_details.py +9 -1
  55. platform_api_python_client/models/prometheus_adapter.py +89 -0
  56. platform_api_python_client/models/service_account_response.py +118 -0
  57. platform_api_python_client/models/spire.py +89 -0
  58. platform_api_python_client/models/spire_crds.py +89 -0
  59. platform_api_python_client/models/teleport_kube_agent.py +89 -0
  60. platform_api_python_client/models/update_service_account_request.py +107 -0
  61. platform_api_python_client/models/volume_access_mode.py +37 -0
  62. platform_api_python_client/models/volume_backend.py +37 -0
  63. platform_api_python_client/models/volume_status.py +37 -0
  64. platform_api_python_client/models/volume_status_response.py +108 -0
  65. {platform_api_python_client-4.15.0.dist-info → platform_api_python_client-4.23.1.dist-info}/METADATA +1 -1
  66. {platform_api_python_client-4.15.0.dist-info → platform_api_python_client-4.23.1.dist-info}/RECORD +68 -21
  67. {platform_api_python_client-4.15.0.dist-info → platform_api_python_client-4.23.1.dist-info}/WHEEL +1 -1
  68. {platform_api_python_client-4.15.0.dist-info → platform_api_python_client-4.23.1.dist-info}/top_level.txt +0 -0
@@ -22,13 +22,12 @@ from typing import Any, ClassVar, Dict, List
22
22
  from typing import Optional, Set
23
23
  from typing_extensions import Self
24
24
 
25
- class CreateUrlRequest(BaseModel):
25
+ class GenerateServiceAccountSecretResponse(BaseModel):
26
26
  """
27
- CreateUrlRequest
27
+ GenerateServiceAccountSecretResponse
28
28
  """ # noqa: E501
29
- filename: StrictStr
30
- extension: StrictStr
31
- __properties: ClassVar[List[str]] = ["filename", "extension"]
29
+ client_secret: StrictStr
30
+ __properties: ClassVar[List[str]] = ["client_secret"]
32
31
 
33
32
  model_config = ConfigDict(
34
33
  populate_by_name=True,
@@ -48,7 +47,7 @@ class CreateUrlRequest(BaseModel):
48
47
 
49
48
  @classmethod
50
49
  def from_json(cls, json_str: str) -> Optional[Self]:
51
- """Create an instance of CreateUrlRequest from a JSON string"""
50
+ """Create an instance of GenerateServiceAccountSecretResponse from a JSON string"""
52
51
  return cls.from_dict(json.loads(json_str))
53
52
 
54
53
  def to_dict(self) -> Dict[str, Any]:
@@ -73,7 +72,7 @@ class CreateUrlRequest(BaseModel):
73
72
 
74
73
  @classmethod
75
74
  def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
76
- """Create an instance of CreateUrlRequest from a dict"""
75
+ """Create an instance of GenerateServiceAccountSecretResponse from a dict"""
77
76
  if obj is None:
78
77
  return None
79
78
 
@@ -81,8 +80,7 @@ class CreateUrlRequest(BaseModel):
81
80
  return cls.model_validate(obj)
82
81
 
83
82
  _obj = cls.model_validate({
84
- "filename": obj.get("filename"),
85
- "extension": obj.get("extension")
83
+ "client_secret": obj.get("client_secret")
86
84
  })
87
85
  return _obj
88
86
 
@@ -0,0 +1,115 @@
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, field_validator
22
+ from typing import Any, ClassVar, Dict, List
23
+ from platform_api_python_client.models.volume_access_mode import VolumeAccessMode
24
+ from platform_api_python_client.models.volume_status import VolumeStatus
25
+ from typing import Optional, Set
26
+ from typing_extensions import Self
27
+
28
+ class GetBlockVolumeResponse(BaseModel):
29
+ """
30
+ GetBlockVolumeResponse
31
+ """ # noqa: E501
32
+ id: StrictInt
33
+ name: StrictStr
34
+ cluster_id: StrictInt
35
+ backend: StrictStr
36
+ access_mode: VolumeAccessMode
37
+ status: VolumeStatus
38
+ pvc_name: StrictStr
39
+ created_at: datetime
40
+ size_gb: StrictInt
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"]
43
+
44
+ @field_validator('backend')
45
+ def backend_validate_enum(cls, value):
46
+ """Validates the enum"""
47
+ if value not in set(['block']):
48
+ raise ValueError("must be one of enum values ('block')")
49
+ return value
50
+
51
+ model_config = ConfigDict(
52
+ populate_by_name=True,
53
+ validate_assignment=True,
54
+ protected_namespaces=(),
55
+ )
56
+
57
+
58
+ def to_str(self) -> str:
59
+ """Returns the string representation of the model using alias"""
60
+ return pprint.pformat(self.model_dump(by_alias=True))
61
+
62
+ def to_json(self) -> str:
63
+ """Returns the JSON representation of the model using alias"""
64
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
65
+ return json.dumps(self.to_dict())
66
+
67
+ @classmethod
68
+ def from_json(cls, json_str: str) -> Optional[Self]:
69
+ """Create an instance of GetBlockVolumeResponse from a JSON string"""
70
+ return cls.from_dict(json.loads(json_str))
71
+
72
+ def to_dict(self) -> Dict[str, Any]:
73
+ """Return the dictionary representation of the model using alias.
74
+
75
+ This has the following differences from calling pydantic's
76
+ `self.model_dump(by_alias=True)`:
77
+
78
+ * `None` is only added to the output dict for nullable fields that
79
+ were set at model initialization. Other fields with value `None`
80
+ are ignored.
81
+ """
82
+ excluded_fields: Set[str] = set([
83
+ ])
84
+
85
+ _dict = self.model_dump(
86
+ by_alias=True,
87
+ exclude=excluded_fields,
88
+ exclude_none=True,
89
+ )
90
+ return _dict
91
+
92
+ @classmethod
93
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
94
+ """Create an instance of GetBlockVolumeResponse from a dict"""
95
+ if obj is None:
96
+ return None
97
+
98
+ if not isinstance(obj, dict):
99
+ return cls.model_validate(obj)
100
+
101
+ _obj = cls.model_validate({
102
+ "id": obj.get("id"),
103
+ "name": obj.get("name"),
104
+ "cluster_id": obj.get("cluster_id"),
105
+ "backend": obj.get("backend"),
106
+ "access_mode": obj.get("access_mode"),
107
+ "status": obj.get("status"),
108
+ "pvc_name": obj.get("pvc_name"),
109
+ "created_at": obj.get("created_at"),
110
+ "size_gb": obj.get("size_gb"),
111
+ "storage_class": obj.get("storage_class")
112
+ })
113
+ return _obj
114
+
115
+
@@ -22,6 +22,7 @@ from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt, StrictStr
22
22
  from typing import Any, ClassVar, Dict, List, Optional
23
23
  from platform_api_python_client.models.deployment_status import DeploymentStatus
24
24
  from platform_api_python_client.models.deployment_type import DeploymentType
25
+ from platform_api_python_client.models.image_pull_secret_credentials import ImagePullSecretCredentials
25
26
  from typing import Optional, Set
26
27
  from typing_extensions import Self
27
28
 
@@ -45,8 +46,9 @@ class GetComputeDeploymentResponse(BaseModel):
45
46
  ssh_public_key: Optional[StrictStr] = None
46
47
  ssh_password: Optional[StrictStr] = None
47
48
  env_vars: Optional[Dict[str, StrictStr]] = None
49
+ image_pull_secret_credentials: Optional[ImagePullSecretCredentials] = None
48
50
  enable_logging: Optional[StrictBool] = True
49
- __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", "exposed_port", "ssh_public_key", "ssh_password", "env_vars", "enable_logging"]
51
+ __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", "exposed_port", "ssh_public_key", "ssh_password", "env_vars", "image_pull_secret_credentials", "enable_logging"]
50
52
 
51
53
  model_config = ConfigDict(
52
54
  populate_by_name=True,
@@ -87,6 +89,9 @@ class GetComputeDeploymentResponse(BaseModel):
87
89
  exclude=excluded_fields,
88
90
  exclude_none=True,
89
91
  )
92
+ # override the default output from pydantic by calling `to_dict()` of image_pull_secret_credentials
93
+ if self.image_pull_secret_credentials:
94
+ _dict['image_pull_secret_credentials'] = self.image_pull_secret_credentials.to_dict()
90
95
  # set to None if image_url (nullable) is None
91
96
  # and model_fields_set contains the field
92
97
  if self.image_url is None and "image_url" in self.model_fields_set:
@@ -112,6 +117,11 @@ class GetComputeDeploymentResponse(BaseModel):
112
117
  if self.env_vars is None and "env_vars" in self.model_fields_set:
113
118
  _dict['env_vars'] = None
114
119
 
120
+ # set to None if image_pull_secret_credentials (nullable) is None
121
+ # and model_fields_set contains the field
122
+ if self.image_pull_secret_credentials is None and "image_pull_secret_credentials" in self.model_fields_set:
123
+ _dict['image_pull_secret_credentials'] = None
124
+
115
125
  return _dict
116
126
 
117
127
  @classmethod
@@ -140,6 +150,7 @@ class GetComputeDeploymentResponse(BaseModel):
140
150
  "ssh_public_key": obj.get("ssh_public_key"),
141
151
  "ssh_password": obj.get("ssh_password"),
142
152
  "env_vars": obj.get("env_vars"),
153
+ "image_pull_secret_credentials": ImagePullSecretCredentials.from_dict(obj["image_pull_secret_credentials"]) if obj.get("image_pull_secret_credentials") is not None else None,
143
154
  "enable_logging": obj.get("enable_logging") if obj.get("enable_logging") is not None else True
144
155
  })
145
156
  return _obj
@@ -0,0 +1,179 @@
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 typing import Optional, Set
27
+ from typing_extensions import Self
28
+
29
+ class GetDynamoDeploymentResponse(BaseModel):
30
+ """
31
+ GetDynamoDeploymentResponse
32
+ """ # noqa: E501
33
+ creator_email: StrictStr
34
+ cluster_id: StrictInt
35
+ id: StrictInt
36
+ name: StrictStr
37
+ endpoint_url: StrictStr
38
+ image_url: Optional[StrictStr] = None
39
+ type: DeploymentType
40
+ status: DeploymentStatus
41
+ created_at: datetime
42
+ hardware_instance_id: StrictInt
43
+ revision_number: StrictInt
44
+ user_annotations: Optional[Dict[str, StrictStr]] = None
45
+ model: StrictStr
46
+ served_model_name: Optional[StrictStr] = None
47
+ min_replicas: StrictInt
48
+ max_replicas: StrictInt
49
+ concurrency: Optional[StrictInt] = None
50
+ cooldown_period: Optional[StrictInt] = None
51
+ extra_args: Optional[StrictStr] = None
52
+ env_vars: Optional[Dict[str, StrictStr]] = None
53
+ endpoint_certificate_authority: Optional[StrictStr] = None
54
+ endpoint_bearer_token: Optional[StrictStr] = None
55
+ enable_logging: Optional[StrictBool] = True
56
+ enable_node_model_cache: Optional[StrictBool] = False
57
+ backend_protocol: Optional[BackendProtocol] = None
58
+ __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", "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"]
59
+
60
+ model_config = ConfigDict(
61
+ populate_by_name=True,
62
+ validate_assignment=True,
63
+ protected_namespaces=(),
64
+ )
65
+
66
+
67
+ def to_str(self) -> str:
68
+ """Returns the string representation of the model using alias"""
69
+ return pprint.pformat(self.model_dump(by_alias=True))
70
+
71
+ def to_json(self) -> str:
72
+ """Returns the JSON representation of the model using alias"""
73
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
74
+ return json.dumps(self.to_dict())
75
+
76
+ @classmethod
77
+ def from_json(cls, json_str: str) -> Optional[Self]:
78
+ """Create an instance of GetDynamoDeploymentResponse from a JSON string"""
79
+ return cls.from_dict(json.loads(json_str))
80
+
81
+ def to_dict(self) -> Dict[str, Any]:
82
+ """Return the dictionary representation of the model using alias.
83
+
84
+ This has the following differences from calling pydantic's
85
+ `self.model_dump(by_alias=True)`:
86
+
87
+ * `None` is only added to the output dict for nullable fields that
88
+ were set at model initialization. Other fields with value `None`
89
+ are ignored.
90
+ """
91
+ excluded_fields: Set[str] = set([
92
+ ])
93
+
94
+ _dict = self.model_dump(
95
+ by_alias=True,
96
+ exclude=excluded_fields,
97
+ exclude_none=True,
98
+ )
99
+ # set to None if image_url (nullable) is None
100
+ # and model_fields_set contains the field
101
+ if self.image_url is None and "image_url" in self.model_fields_set:
102
+ _dict['image_url'] = None
103
+
104
+ # set to None if user_annotations (nullable) is None
105
+ # and model_fields_set contains the field
106
+ if self.user_annotations is None and "user_annotations" in self.model_fields_set:
107
+ _dict['user_annotations'] = None
108
+
109
+ # set to None if served_model_name (nullable) is None
110
+ # and model_fields_set contains the field
111
+ if self.served_model_name is None and "served_model_name" in self.model_fields_set:
112
+ _dict['served_model_name'] = None
113
+
114
+ # set to None if concurrency (nullable) is None
115
+ # and model_fields_set contains the field
116
+ if self.concurrency is None and "concurrency" in self.model_fields_set:
117
+ _dict['concurrency'] = None
118
+
119
+ # set to None if cooldown_period (nullable) is None
120
+ # and model_fields_set contains the field
121
+ if self.cooldown_period is None and "cooldown_period" in self.model_fields_set:
122
+ _dict['cooldown_period'] = None
123
+
124
+ # set to None if extra_args (nullable) is None
125
+ # and model_fields_set contains the field
126
+ if self.extra_args is None and "extra_args" in self.model_fields_set:
127
+ _dict['extra_args'] = None
128
+
129
+ # set to None if endpoint_certificate_authority (nullable) is None
130
+ # and model_fields_set contains the field
131
+ if self.endpoint_certificate_authority is None and "endpoint_certificate_authority" in self.model_fields_set:
132
+ _dict['endpoint_certificate_authority'] = None
133
+
134
+ # set to None if endpoint_bearer_token (nullable) is None
135
+ # and model_fields_set contains the field
136
+ if self.endpoint_bearer_token is None and "endpoint_bearer_token" in self.model_fields_set:
137
+ _dict['endpoint_bearer_token'] = None
138
+
139
+ return _dict
140
+
141
+ @classmethod
142
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
143
+ """Create an instance of GetDynamoDeploymentResponse from a dict"""
144
+ if obj is None:
145
+ return None
146
+
147
+ if not isinstance(obj, dict):
148
+ return cls.model_validate(obj)
149
+
150
+ _obj = cls.model_validate({
151
+ "creator_email": obj.get("creator_email"),
152
+ "cluster_id": obj.get("cluster_id"),
153
+ "id": obj.get("id"),
154
+ "name": obj.get("name"),
155
+ "endpoint_url": obj.get("endpoint_url"),
156
+ "image_url": obj.get("image_url"),
157
+ "type": obj.get("type"),
158
+ "status": obj.get("status"),
159
+ "created_at": obj.get("created_at"),
160
+ "hardware_instance_id": obj.get("hardware_instance_id"),
161
+ "revision_number": obj.get("revision_number"),
162
+ "user_annotations": obj.get("user_annotations"),
163
+ "model": obj.get("model"),
164
+ "served_model_name": obj.get("served_model_name"),
165
+ "min_replicas": obj.get("min_replicas"),
166
+ "max_replicas": obj.get("max_replicas"),
167
+ "concurrency": obj.get("concurrency"),
168
+ "cooldown_period": obj.get("cooldown_period"),
169
+ "extra_args": obj.get("extra_args"),
170
+ "env_vars": obj.get("env_vars"),
171
+ "endpoint_certificate_authority": obj.get("endpoint_certificate_authority"),
172
+ "endpoint_bearer_token": obj.get("endpoint_bearer_token"),
173
+ "enable_logging": obj.get("enable_logging") if obj.get("enable_logging") is not None else True,
174
+ "enable_node_model_cache": obj.get("enable_node_model_cache") if obj.get("enable_node_model_cache") is not None else False,
175
+ "backend_protocol": obj.get("backend_protocol")
176
+ })
177
+ return _obj
178
+
179
+
@@ -20,6 +20,7 @@ import json
20
20
  from datetime import datetime
21
21
  from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt, StrictStr
22
22
  from typing import Any, ClassVar, Dict, List, Optional
23
+ from platform_api_python_client.models.config_file_mount import ConfigFileMount
23
24
  from platform_api_python_client.models.deployment_status import DeploymentStatus
24
25
  from platform_api_python_client.models.deployment_type import DeploymentType
25
26
  from platform_api_python_client.models.image_pull_secret_credentials import ImagePullSecretCredentials
@@ -52,7 +53,8 @@ class GetJobDeploymentResponse(BaseModel):
52
53
  active_deadline_seconds: Optional[StrictInt] = None
53
54
  image_pull_secret_credentials: Optional[ImagePullSecretCredentials] = None
54
55
  enable_logging: Optional[StrictBool] = True
55
- __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", "env_vars", "command", "args", "original_command", "completions", "parallelism", "backoff_limit", "active_deadline_seconds", "image_pull_secret_credentials", "enable_logging"]
56
+ config_file: Optional[ConfigFileMount] = None
57
+ __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", "env_vars", "command", "args", "original_command", "completions", "parallelism", "backoff_limit", "active_deadline_seconds", "image_pull_secret_credentials", "enable_logging", "config_file"]
56
58
 
57
59
  model_config = ConfigDict(
58
60
  populate_by_name=True,
@@ -96,6 +98,9 @@ class GetJobDeploymentResponse(BaseModel):
96
98
  # override the default output from pydantic by calling `to_dict()` of image_pull_secret_credentials
97
99
  if self.image_pull_secret_credentials:
98
100
  _dict['image_pull_secret_credentials'] = self.image_pull_secret_credentials.to_dict()
101
+ # override the default output from pydantic by calling `to_dict()` of config_file
102
+ if self.config_file:
103
+ _dict['config_file'] = self.config_file.to_dict()
99
104
  # set to None if image_url (nullable) is None
100
105
  # and model_fields_set contains the field
101
106
  if self.image_url is None and "image_url" in self.model_fields_set:
@@ -136,6 +141,11 @@ class GetJobDeploymentResponse(BaseModel):
136
141
  if self.image_pull_secret_credentials is None and "image_pull_secret_credentials" in self.model_fields_set:
137
142
  _dict['image_pull_secret_credentials'] = None
138
143
 
144
+ # set to None if config_file (nullable) is None
145
+ # and model_fields_set contains the field
146
+ if self.config_file is None and "config_file" in self.model_fields_set:
147
+ _dict['config_file'] = None
148
+
139
149
  return _dict
140
150
 
141
151
  @classmethod
@@ -169,7 +179,8 @@ class GetJobDeploymentResponse(BaseModel):
169
179
  "backoff_limit": obj.get("backoff_limit") if obj.get("backoff_limit") is not None else 3,
170
180
  "active_deadline_seconds": obj.get("active_deadline_seconds"),
171
181
  "image_pull_secret_credentials": ImagePullSecretCredentials.from_dict(obj["image_pull_secret_credentials"]) if obj.get("image_pull_secret_credentials") is not None else None,
172
- "enable_logging": obj.get("enable_logging") if obj.get("enable_logging") is not None else True
182
+ "enable_logging": obj.get("enable_logging") if obj.get("enable_logging") is not None else True,
183
+ "config_file": ConfigFileMount.from_dict(obj["config_file"]) if obj.get("config_file") is not None else None
173
184
  })
174
185
  return _obj
175
186
 
@@ -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 datetime import datetime
21
+ from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt, StrictStr, field_validator
22
+ from typing import Any, ClassVar, Dict, List, Optional
23
+ from platform_api_python_client.models.object_storage_provider import ObjectStorageProvider
24
+ from platform_api_python_client.models.volume_access_mode import VolumeAccessMode
25
+ from platform_api_python_client.models.volume_status import VolumeStatus
26
+ from typing import Optional, Set
27
+ from typing_extensions import Self
28
+
29
+ class GetObjectVolumeResponse(BaseModel):
30
+ """
31
+ GetObjectVolumeResponse
32
+ """ # noqa: E501
33
+ id: StrictInt
34
+ name: StrictStr
35
+ cluster_id: StrictInt
36
+ backend: StrictStr
37
+ access_mode: VolumeAccessMode
38
+ status: VolumeStatus
39
+ pvc_name: StrictStr
40
+ created_at: datetime
41
+ provider: ObjectStorageProvider
42
+ bucket: StrictStr
43
+ region: StrictStr
44
+ prefix: Optional[StrictStr] = None
45
+ read_only: StrictBool
46
+ volume_attributes: Optional[Dict[str, StrictStr]] = None
47
+ mount_options: Optional[List[StrictStr]] = None
48
+ __properties: ClassVar[List[str]] = ["id", "name", "cluster_id", "backend", "access_mode", "status", "pvc_name", "created_at", "provider", "bucket", "region", "prefix", "read_only", "volume_attributes", "mount_options"]
49
+
50
+ @field_validator('backend')
51
+ def backend_validate_enum(cls, value):
52
+ """Validates the enum"""
53
+ if value not in set(['object']):
54
+ raise ValueError("must be one of enum values ('object')")
55
+ return value
56
+
57
+ model_config = ConfigDict(
58
+ populate_by_name=True,
59
+ validate_assignment=True,
60
+ protected_namespaces=(),
61
+ )
62
+
63
+
64
+ def to_str(self) -> str:
65
+ """Returns the string representation of the model using alias"""
66
+ return pprint.pformat(self.model_dump(by_alias=True))
67
+
68
+ def to_json(self) -> str:
69
+ """Returns the JSON representation of the model using alias"""
70
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
71
+ return json.dumps(self.to_dict())
72
+
73
+ @classmethod
74
+ def from_json(cls, json_str: str) -> Optional[Self]:
75
+ """Create an instance of GetObjectVolumeResponse from a JSON string"""
76
+ return cls.from_dict(json.loads(json_str))
77
+
78
+ def to_dict(self) -> Dict[str, Any]:
79
+ """Return the dictionary representation of the model using alias.
80
+
81
+ This has the following differences from calling pydantic's
82
+ `self.model_dump(by_alias=True)`:
83
+
84
+ * `None` is only added to the output dict for nullable fields that
85
+ were set at model initialization. Other fields with value `None`
86
+ are ignored.
87
+ """
88
+ excluded_fields: Set[str] = set([
89
+ ])
90
+
91
+ _dict = self.model_dump(
92
+ by_alias=True,
93
+ exclude=excluded_fields,
94
+ exclude_none=True,
95
+ )
96
+ # set to None if prefix (nullable) is None
97
+ # and model_fields_set contains the field
98
+ if self.prefix is None and "prefix" in self.model_fields_set:
99
+ _dict['prefix'] = None
100
+
101
+ # set to None if volume_attributes (nullable) is None
102
+ # and model_fields_set contains the field
103
+ if self.volume_attributes is None and "volume_attributes" in self.model_fields_set:
104
+ _dict['volume_attributes'] = None
105
+
106
+ # set to None if mount_options (nullable) is None
107
+ # and model_fields_set contains the field
108
+ if self.mount_options is None and "mount_options" in self.model_fields_set:
109
+ _dict['mount_options'] = None
110
+
111
+ return _dict
112
+
113
+ @classmethod
114
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
115
+ """Create an instance of GetObjectVolumeResponse from a dict"""
116
+ if obj is None:
117
+ return None
118
+
119
+ if not isinstance(obj, dict):
120
+ return cls.model_validate(obj)
121
+
122
+ _obj = cls.model_validate({
123
+ "id": obj.get("id"),
124
+ "name": obj.get("name"),
125
+ "cluster_id": obj.get("cluster_id"),
126
+ "backend": obj.get("backend"),
127
+ "access_mode": obj.get("access_mode"),
128
+ "status": obj.get("status"),
129
+ "pvc_name": obj.get("pvc_name"),
130
+ "created_at": obj.get("created_at"),
131
+ "provider": obj.get("provider"),
132
+ "bucket": obj.get("bucket"),
133
+ "region": obj.get("region"),
134
+ "prefix": obj.get("prefix"),
135
+ "read_only": obj.get("read_only"),
136
+ "volume_attributes": obj.get("volume_attributes"),
137
+ "mount_options": obj.get("mount_options")
138
+ })
139
+ return _obj
140
+
141
+