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.
- platform_api_python_client/__init__.py +50 -3
- platform_api_python_client/api/external_api.py +5460 -1700
- platform_api_python_client/api_client.py +1 -1
- platform_api_python_client/configuration.py +1 -1
- platform_api_python_client/models/__init__.py +49 -2
- platform_api_python_client/models/argo_rollouts.py +89 -0
- platform_api_python_client/models/cert_manager.py +89 -0
- platform_api_python_client/models/cloud_provider.py +39 -0
- platform_api_python_client/models/cluster_components.py +193 -0
- platform_api_python_client/models/cluster_config.py +91 -0
- platform_api_python_client/models/cluster_credential.py +91 -0
- platform_api_python_client/models/cluster_registration_request.py +110 -0
- platform_api_python_client/models/{create_url_response.py → cluster_registration_response.py} +8 -9
- platform_api_python_client/models/create_block_volume_request.py +125 -0
- platform_api_python_client/models/create_c_serve_v3_deployment_request.py +3 -1
- platform_api_python_client/models/create_compute_deployment_request.py +14 -3
- platform_api_python_client/models/create_compute_deployment_response.py +3 -10
- platform_api_python_client/models/create_dynamo_deployment_request.py +186 -0
- platform_api_python_client/models/create_dynamo_deployment_response.py +92 -0
- platform_api_python_client/models/create_inference_v3_deployment_request.py +3 -1
- platform_api_python_client/models/create_job_deployment_request.py +15 -2
- platform_api_python_client/models/create_object_volume_request.py +136 -0
- platform_api_python_client/models/create_service_account_request.py +97 -0
- platform_api_python_client/models/create_service_account_response.py +120 -0
- platform_api_python_client/models/create_volume_request.py +140 -0
- platform_api_python_client/models/deployment_component_type.py +40 -0
- platform_api_python_client/models/deployment_response.py +25 -10
- platform_api_python_client/models/deployment_type.py +1 -0
- platform_api_python_client/models/external_dns.py +89 -0
- platform_api_python_client/models/final_stack.py +89 -0
- platform_api_python_client/models/fluent_bit.py +89 -0
- platform_api_python_client/models/{create_url_request.py → generate_service_account_secret_response.py} +7 -9
- platform_api_python_client/models/get_block_volume_response.py +115 -0
- platform_api_python_client/models/get_compute_deployment_response.py +12 -1
- platform_api_python_client/models/get_dynamo_deployment_response.py +179 -0
- platform_api_python_client/models/get_job_deployment_response.py +13 -2
- platform_api_python_client/models/get_object_volume_response.py +141 -0
- platform_api_python_client/models/get_volume_response.py +140 -0
- platform_api_python_client/models/gpu_operator.py +89 -0
- platform_api_python_client/models/ingress_nginx.py +89 -0
- platform_api_python_client/models/istio.py +98 -0
- platform_api_python_client/models/istio_cni_overrides.py +99 -0
- platform_api_python_client/models/istio_cni_subchart_overrides.py +96 -0
- platform_api_python_client/models/istio_overrides.py +96 -0
- platform_api_python_client/models/keda.py +89 -0
- platform_api_python_client/models/kube_prometheus_stack.py +89 -0
- platform_api_python_client/models/list_service_accounts_response.py +95 -0
- platform_api_python_client/models/list_volumes_response.py +95 -0
- platform_api_python_client/models/longhorn.py +89 -0
- platform_api_python_client/models/metrics_server.py +89 -0
- platform_api_python_client/models/network_operator.py +89 -0
- platform_api_python_client/models/object_storage_provider.py +36 -0
- platform_api_python_client/models/opentelemetry_collector.py +89 -0
- platform_api_python_client/models/pod_details.py +9 -1
- platform_api_python_client/models/prometheus_adapter.py +89 -0
- platform_api_python_client/models/service_account_response.py +118 -0
- platform_api_python_client/models/spire.py +89 -0
- platform_api_python_client/models/spire_crds.py +89 -0
- platform_api_python_client/models/teleport_kube_agent.py +89 -0
- platform_api_python_client/models/update_service_account_request.py +107 -0
- platform_api_python_client/models/volume_access_mode.py +37 -0
- platform_api_python_client/models/volume_backend.py +37 -0
- platform_api_python_client/models/volume_status.py +37 -0
- platform_api_python_client/models/volume_status_response.py +108 -0
- {platform_api_python_client-4.15.0.dist-info → platform_api_python_client-4.23.1.dist-info}/METADATA +1 -1
- {platform_api_python_client-4.15.0.dist-info → platform_api_python_client-4.23.1.dist-info}/RECORD +68 -21
- {platform_api_python_client-4.15.0.dist-info → platform_api_python_client-4.23.1.dist-info}/WHEEL +1 -1
- {platform_api_python_client-4.15.0.dist-info → platform_api_python_client-4.23.1.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,89 @@
|
|
|
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, Optional
|
|
22
|
+
from typing import Optional, Set
|
|
23
|
+
from typing_extensions import Self
|
|
24
|
+
|
|
25
|
+
class NetworkOperator(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
NetworkOperator
|
|
28
|
+
""" # noqa: E501
|
|
29
|
+
enabled: Optional[StrictBool] = True
|
|
30
|
+
values: Optional[Dict[str, Any]] = None
|
|
31
|
+
__properties: ClassVar[List[str]] = ["enabled", "values"]
|
|
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 NetworkOperator 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 NetworkOperator 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
|
+
"enabled": obj.get("enabled") if obj.get("enabled") is not None else True,
|
|
85
|
+
"values": obj.get("values")
|
|
86
|
+
})
|
|
87
|
+
return _obj
|
|
88
|
+
|
|
89
|
+
|
|
@@ -0,0 +1,36 @@
|
|
|
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 ObjectStorageProvider(str, Enum):
|
|
22
|
+
"""
|
|
23
|
+
ObjectStorageProvider
|
|
24
|
+
"""
|
|
25
|
+
|
|
26
|
+
"""
|
|
27
|
+
allowed enum values
|
|
28
|
+
"""
|
|
29
|
+
S3 = 's3'
|
|
30
|
+
|
|
31
|
+
@classmethod
|
|
32
|
+
def from_json(cls, json_str: str) -> Self:
|
|
33
|
+
"""Create an instance of ObjectStorageProvider from a JSON string"""
|
|
34
|
+
return cls(json.loads(json_str))
|
|
35
|
+
|
|
36
|
+
|
|
@@ -0,0 +1,89 @@
|
|
|
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, Optional
|
|
22
|
+
from typing import Optional, Set
|
|
23
|
+
from typing_extensions import Self
|
|
24
|
+
|
|
25
|
+
class OpentelemetryCollector(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
OpentelemetryCollector
|
|
28
|
+
""" # noqa: E501
|
|
29
|
+
enabled: Optional[StrictBool] = True
|
|
30
|
+
values: Optional[Dict[str, Any]] = None
|
|
31
|
+
__properties: ClassVar[List[str]] = ["enabled", "values"]
|
|
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 OpentelemetryCollector 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 OpentelemetryCollector 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
|
+
"enabled": obj.get("enabled") if obj.get("enabled") is not None else True,
|
|
85
|
+
"values": obj.get("values")
|
|
86
|
+
})
|
|
87
|
+
return _obj
|
|
88
|
+
|
|
89
|
+
|
|
@@ -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,89 @@
|
|
|
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, Optional
|
|
22
|
+
from typing import Optional, Set
|
|
23
|
+
from typing_extensions import Self
|
|
24
|
+
|
|
25
|
+
class PrometheusAdapter(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
PrometheusAdapter
|
|
28
|
+
""" # noqa: E501
|
|
29
|
+
enabled: Optional[StrictBool] = True
|
|
30
|
+
values: Optional[Dict[str, Any]] = None
|
|
31
|
+
__properties: ClassVar[List[str]] = ["enabled", "values"]
|
|
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 PrometheusAdapter 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 PrometheusAdapter 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
|
+
"enabled": obj.get("enabled") if obj.get("enabled") is not None else True,
|
|
85
|
+
"values": obj.get("values")
|
|
86
|
+
})
|
|
87
|
+
return _obj
|
|
88
|
+
|
|
89
|
+
|
|
@@ -0,0 +1,118 @@
|
|
|
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, StrictStr
|
|
22
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
23
|
+
from typing import Optional, Set
|
|
24
|
+
from typing_extensions import Self
|
|
25
|
+
|
|
26
|
+
class ServiceAccountResponse(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
ServiceAccountResponse
|
|
29
|
+
""" # noqa: E501
|
|
30
|
+
workos_id: StrictStr
|
|
31
|
+
name: Optional[StrictStr] = None
|
|
32
|
+
description: Optional[StrictStr] = None
|
|
33
|
+
scopes: Optional[List[StrictStr]] = None
|
|
34
|
+
created_at: Optional[datetime] = None
|
|
35
|
+
updated_at: Optional[datetime] = None
|
|
36
|
+
__properties: ClassVar[List[str]] = ["workos_id", "name", "description", "scopes", "created_at", "updated_at"]
|
|
37
|
+
|
|
38
|
+
model_config = ConfigDict(
|
|
39
|
+
populate_by_name=True,
|
|
40
|
+
validate_assignment=True,
|
|
41
|
+
protected_namespaces=(),
|
|
42
|
+
)
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
def to_str(self) -> str:
|
|
46
|
+
"""Returns the string representation of the model using alias"""
|
|
47
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
48
|
+
|
|
49
|
+
def to_json(self) -> str:
|
|
50
|
+
"""Returns the JSON representation of the model using alias"""
|
|
51
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
52
|
+
return json.dumps(self.to_dict())
|
|
53
|
+
|
|
54
|
+
@classmethod
|
|
55
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
56
|
+
"""Create an instance of ServiceAccountResponse from a JSON string"""
|
|
57
|
+
return cls.from_dict(json.loads(json_str))
|
|
58
|
+
|
|
59
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
60
|
+
"""Return the dictionary representation of the model using alias.
|
|
61
|
+
|
|
62
|
+
This has the following differences from calling pydantic's
|
|
63
|
+
`self.model_dump(by_alias=True)`:
|
|
64
|
+
|
|
65
|
+
* `None` is only added to the output dict for nullable fields that
|
|
66
|
+
were set at model initialization. Other fields with value `None`
|
|
67
|
+
are ignored.
|
|
68
|
+
"""
|
|
69
|
+
excluded_fields: Set[str] = set([
|
|
70
|
+
])
|
|
71
|
+
|
|
72
|
+
_dict = self.model_dump(
|
|
73
|
+
by_alias=True,
|
|
74
|
+
exclude=excluded_fields,
|
|
75
|
+
exclude_none=True,
|
|
76
|
+
)
|
|
77
|
+
# set to None if name (nullable) is None
|
|
78
|
+
# and model_fields_set contains the field
|
|
79
|
+
if self.name is None and "name" in self.model_fields_set:
|
|
80
|
+
_dict['name'] = None
|
|
81
|
+
|
|
82
|
+
# set to None if description (nullable) is None
|
|
83
|
+
# and model_fields_set contains the field
|
|
84
|
+
if self.description is None and "description" in self.model_fields_set:
|
|
85
|
+
_dict['description'] = None
|
|
86
|
+
|
|
87
|
+
# set to None if created_at (nullable) is None
|
|
88
|
+
# and model_fields_set contains the field
|
|
89
|
+
if self.created_at is None and "created_at" in self.model_fields_set:
|
|
90
|
+
_dict['created_at'] = None
|
|
91
|
+
|
|
92
|
+
# set to None if updated_at (nullable) is None
|
|
93
|
+
# and model_fields_set contains the field
|
|
94
|
+
if self.updated_at is None and "updated_at" in self.model_fields_set:
|
|
95
|
+
_dict['updated_at'] = None
|
|
96
|
+
|
|
97
|
+
return _dict
|
|
98
|
+
|
|
99
|
+
@classmethod
|
|
100
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
101
|
+
"""Create an instance of ServiceAccountResponse from a dict"""
|
|
102
|
+
if obj is None:
|
|
103
|
+
return None
|
|
104
|
+
|
|
105
|
+
if not isinstance(obj, dict):
|
|
106
|
+
return cls.model_validate(obj)
|
|
107
|
+
|
|
108
|
+
_obj = cls.model_validate({
|
|
109
|
+
"workos_id": obj.get("workos_id"),
|
|
110
|
+
"name": obj.get("name"),
|
|
111
|
+
"description": obj.get("description"),
|
|
112
|
+
"scopes": obj.get("scopes"),
|
|
113
|
+
"created_at": obj.get("created_at"),
|
|
114
|
+
"updated_at": obj.get("updated_at")
|
|
115
|
+
})
|
|
116
|
+
return _obj
|
|
117
|
+
|
|
118
|
+
|
|
@@ -0,0 +1,89 @@
|
|
|
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, Optional
|
|
22
|
+
from typing import Optional, Set
|
|
23
|
+
from typing_extensions import Self
|
|
24
|
+
|
|
25
|
+
class Spire(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
Spire
|
|
28
|
+
""" # noqa: E501
|
|
29
|
+
enabled: Optional[StrictBool] = True
|
|
30
|
+
values: Optional[Dict[str, Any]] = None
|
|
31
|
+
__properties: ClassVar[List[str]] = ["enabled", "values"]
|
|
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 Spire 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 Spire 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
|
+
"enabled": obj.get("enabled") if obj.get("enabled") is not None else True,
|
|
85
|
+
"values": obj.get("values")
|
|
86
|
+
})
|
|
87
|
+
return _obj
|
|
88
|
+
|
|
89
|
+
|
|
@@ -0,0 +1,89 @@
|
|
|
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, Optional
|
|
22
|
+
from typing import Optional, Set
|
|
23
|
+
from typing_extensions import Self
|
|
24
|
+
|
|
25
|
+
class SpireCrds(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
SpireCrds
|
|
28
|
+
""" # noqa: E501
|
|
29
|
+
enabled: Optional[StrictBool] = True
|
|
30
|
+
values: Optional[Dict[str, Any]] = None
|
|
31
|
+
__properties: ClassVar[List[str]] = ["enabled", "values"]
|
|
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 SpireCrds 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 SpireCrds 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
|
+
"enabled": obj.get("enabled") if obj.get("enabled") is not None else True,
|
|
85
|
+
"values": obj.get("values")
|
|
86
|
+
})
|
|
87
|
+
return _obj
|
|
88
|
+
|
|
89
|
+
|