render_sdk 0.1.3__py3-none-any.whl → 0.2.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.
- render_sdk/__init__.py +41 -4
- render_sdk/client/__init__.py +25 -0
- render_sdk/client/client.py +5 -0
- render_sdk/client/sse.py +5 -1
- render_sdk/client/tests/test_client.py +6 -4
- render_sdk/client/tests/test_sse.py +1 -0
- render_sdk/client/workflows.py +10 -2
- render_sdk/experimental/__init__.py +31 -0
- render_sdk/experimental/experimental.py +71 -0
- render_sdk/experimental/object/__init__.py +30 -0
- render_sdk/experimental/object/api.py +260 -0
- render_sdk/experimental/object/client.py +475 -0
- render_sdk/experimental/object/types.py +87 -0
- render_sdk/public_api/api/audit_logs/list_organization_audit_logs.py +303 -0
- render_sdk/public_api/api/audit_logs/list_owner_audit_logs.py +303 -0
- render_sdk/public_api/api/blob_storage/delete_blob.py +215 -0
- render_sdk/public_api/api/blob_storage/get_blob.py +221 -0
- render_sdk/public_api/api/{workflows/list_workflow_versions.py → blob_storage/list_blobs.py} +52 -30
- render_sdk/public_api/api/blob_storage/put_blob.py +248 -0
- render_sdk/public_api/api/blueprints/validate_blueprint.py +212 -0
- render_sdk/public_api/api/key_value/resume_key_value.py +203 -0
- render_sdk/public_api/api/key_value/suspend_key_value.py +203 -0
- render_sdk/public_api/api/metrics/get_bandwidth_sources.py +251 -0
- render_sdk/public_api/api/postgres/create_postgres_user.py +229 -0
- render_sdk/public_api/api/postgres/delete_postgres_user.py +201 -0
- render_sdk/public_api/api/postgres/list_postgres_users.py +195 -0
- render_sdk/public_api/api/redis_deprecated/__init__.py +1 -0
- render_sdk/public_api/api/{redis → redis_deprecated}/create_redis.py +4 -4
- render_sdk/public_api/api/{redis → redis_deprecated}/delete_redis.py +4 -4
- render_sdk/public_api/api/{redis → redis_deprecated}/list_redis.py +4 -0
- render_sdk/public_api/api/{redis → redis_deprecated}/retrieve_redis.py +4 -4
- render_sdk/public_api/api/{redis → redis_deprecated}/retrieve_redis_connection_info.py +4 -0
- render_sdk/public_api/api/{redis → redis_deprecated}/update_redis.py +4 -4
- render_sdk/public_api/api/services/create_service.py +4 -4
- render_sdk/public_api/api/workflow_tasks_ea/__init__.py +1 -0
- render_sdk/public_api/api/{workflows → workflow_tasks_ea}/cancel_task_run.py +12 -4
- render_sdk/public_api/api/{workflows → workflow_tasks_ea}/create_task.py +12 -4
- render_sdk/public_api/api/{workflows → workflow_tasks_ea}/get_task.py +12 -4
- render_sdk/public_api/api/{workflows → workflow_tasks_ea}/get_task_run.py +12 -4
- render_sdk/public_api/api/{workflows → workflow_tasks_ea}/list_task_runs.py +12 -0
- render_sdk/public_api/api/{workflows → workflow_tasks_ea}/list_tasks.py +24 -12
- render_sdk/public_api/api/workflows_ea/__init__.py +1 -0
- render_sdk/public_api/api/workflows_ea/create_workflow.py +199 -0
- render_sdk/public_api/api/{workflows/deploy_workflow.py → workflows_ea/create_workflow_version.py} +31 -14
- render_sdk/public_api/api/{workflows → workflows_ea}/delete_workflow.py +12 -4
- render_sdk/public_api/api/{workflows → workflows_ea}/get_workflow.py +32 -14
- render_sdk/public_api/api/{workflows → workflows_ea}/get_workflow_version.py +12 -4
- render_sdk/public_api/api/workflows_ea/list_workflow_versions.py +275 -0
- render_sdk/public_api/api/{workflows → workflows_ea}/list_workflows.py +41 -14
- render_sdk/public_api/api/workflows_ea/update_workflow.py +212 -0
- render_sdk/public_api/api/workspaces/remove_workspace_member.py +206 -0
- render_sdk/public_api/api/workspaces/update_workspace_member.py +235 -0
- render_sdk/public_api/models/__init__.py +82 -4
- render_sdk/public_api/models/audit_log.py +113 -0
- render_sdk/public_api/models/audit_log_actor.py +80 -0
- render_sdk/public_api/models/audit_log_actor_type.py +10 -0
- render_sdk/public_api/models/audit_log_event.py +80 -0
- render_sdk/public_api/models/audit_log_metadata.py +49 -0
- render_sdk/public_api/models/audit_log_status.py +9 -0
- render_sdk/public_api/models/audit_log_with_cursor.py +73 -0
- render_sdk/public_api/models/background_worker_details.py +2 -2
- render_sdk/public_api/models/background_worker_details_patch.py +1 -1
- render_sdk/public_api/models/background_worker_details_post.py +1 -1
- render_sdk/public_api/models/blob_metadata.py +85 -0
- render_sdk/public_api/models/blob_with_cursor.py +73 -0
- render_sdk/public_api/models/cache.py +6 -4
- render_sdk/public_api/models/cache_profile.py +10 -0
- render_sdk/public_api/models/create_deploy_body.py +23 -0
- render_sdk/public_api/models/create_version.py +70 -0
- render_sdk/public_api/models/credential_create_input.py +59 -0
- render_sdk/public_api/models/cron_job_details.py +2 -2
- render_sdk/public_api/models/cron_job_details_patch.py +1 -1
- render_sdk/public_api/models/cron_job_details_post.py +1 -1
- render_sdk/public_api/models/deploy_mode.py +9 -0
- render_sdk/public_api/models/event.py +11 -27
- render_sdk/public_api/models/event_type.py +1 -1
- render_sdk/public_api/models/get_bandwidth_sources_response_200.py +75 -0
- render_sdk/public_api/models/get_bandwidth_sources_response_200_data_item.py +101 -0
- render_sdk/public_api/models/get_bandwidth_sources_response_200_data_item_labels.py +78 -0
- render_sdk/public_api/models/get_bandwidth_sources_response_200_data_item_labels_traffic_source.py +12 -0
- render_sdk/public_api/models/get_bandwidth_sources_response_200_data_item_values_item.py +68 -0
- render_sdk/public_api/models/{server_unhealthy.py → get_bandwidth_sources_response_400.py} +12 -12
- render_sdk/public_api/models/get_blob_output.py +71 -0
- render_sdk/public_api/models/list_postgres_users_response_200_item.py +86 -0
- render_sdk/public_api/models/otel_provider_type.py +2 -0
- render_sdk/public_api/models/postgres.py +8 -0
- render_sdk/public_api/models/postgres_detail.py +26 -0
- render_sdk/public_api/models/postgres_parameter_overrides.py +44 -0
- render_sdk/public_api/models/postgres_patch_input.py +27 -0
- render_sdk/public_api/models/postgres_post_input.py +27 -0
- render_sdk/public_api/models/postgres_version.py +1 -0
- render_sdk/public_api/models/preview_input.py +2 -2
- render_sdk/public_api/models/private_service_details.py +2 -2
- render_sdk/public_api/models/private_service_details_patch.py +1 -1
- render_sdk/public_api/models/private_service_details_post.py +1 -1
- render_sdk/public_api/models/project_post_environment_input.py +26 -1
- render_sdk/public_api/models/put_blob_input.py +59 -0
- render_sdk/public_api/models/put_blob_output.py +79 -0
- render_sdk/public_api/models/read_replica.py +25 -1
- render_sdk/public_api/models/read_replica_input.py +25 -1
- render_sdk/public_api/models/run_task.py +35 -7
- render_sdk/public_api/models/service_event.py +12 -27
- render_sdk/public_api/models/service_event_type.py +0 -1
- render_sdk/public_api/models/service_post.py +9 -6
- render_sdk/public_api/models/task_attempt.py +88 -0
- render_sdk/public_api/models/task_attempt_details.py +108 -0
- render_sdk/public_api/models/task_data_type_1.py +44 -0
- render_sdk/public_api/models/task_run.py +23 -1
- render_sdk/public_api/models/task_run_details.py +50 -5
- render_sdk/public_api/models/task_run_status.py +1 -0
- render_sdk/public_api/models/task_with_cursor.py +73 -0
- render_sdk/public_api/models/team_member.py +5 -4
- render_sdk/public_api/models/team_member_role.py +12 -0
- render_sdk/public_api/models/update_workspace_member_body.py +61 -0
- render_sdk/public_api/models/validate_blueprint_request.py +84 -0
- render_sdk/public_api/models/validate_blueprint_response.py +105 -0
- render_sdk/public_api/models/validation_error.py +88 -0
- render_sdk/public_api/models/validation_plan_summary.py +107 -0
- render_sdk/public_api/models/web_service_details.py +2 -2
- render_sdk/public_api/models/web_service_details_patch.py +6 -5
- render_sdk/public_api/models/web_service_details_post.py +6 -5
- render_sdk/public_api/models/workflow.py +144 -0
- render_sdk/public_api/models/workflow_create.py +99 -0
- render_sdk/public_api/models/workflow_update.py +90 -0
- render_sdk/public_api/models/workflow_version.py +10 -14
- render_sdk/public_api/models/workflow_version_status.py +13 -0
- render_sdk/public_api/models/workflow_version_with_cursor.py +73 -0
- render_sdk/public_api/models/workflow_with_cursor.py +73 -0
- render_sdk/render.py +65 -0
- render_sdk/version.py +27 -0
- render_sdk/workflows/__init__.py +5 -1
- render_sdk/workflows/app.py +262 -0
- render_sdk/workflows/callback_api/models/task_options.py +18 -0
- render_sdk/workflows/cli.py +58 -0
- render_sdk/workflows/client.py +2 -7
- render_sdk/workflows/runner.py +12 -7
- render_sdk/workflows/task.py +11 -2
- render_sdk/workflows/tests/test_app.py +412 -0
- render_sdk/workflows/tests/test_cli.py +134 -0
- render_sdk/workflows/tests/test_end_to_end.py +69 -1
- render_sdk/workflows/tests/test_registration.py +56 -1
- {render_sdk-0.1.3.dist-info → render_sdk-0.2.0.dist-info}/METADATA +1 -1
- {render_sdk-0.1.3.dist-info → render_sdk-0.2.0.dist-info}/RECORD +149 -78
- render_sdk-0.2.0.dist-info/entry_points.txt +3 -0
- render_sdk/public_api/models/image_version.py +0 -79
- /render_sdk/public_api/api/{redis → audit_logs}/__init__.py +0 -0
- /render_sdk/public_api/api/{workflows → blob_storage}/__init__.py +0 -0
- /render_sdk/public_api/api/{workflows → workflow_tasks_ea}/stream_task_runs_events.py +0 -0
- {render_sdk-0.1.3.dist-info → render_sdk-0.2.0.dist-info}/WHEEL +0 -0
- {render_sdk-0.1.3.dist-info → render_sdk-0.2.0.dist-info}/licenses/LICENSE +0 -0
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
from collections.abc import Mapping
|
|
2
|
+
from typing import TYPE_CHECKING, Any, TypeVar, Union
|
|
3
|
+
|
|
4
|
+
from attrs import define as _attrs_define
|
|
5
|
+
from attrs import field as _attrs_field
|
|
6
|
+
|
|
7
|
+
from ..types import UNSET, Unset
|
|
8
|
+
|
|
9
|
+
if TYPE_CHECKING:
|
|
10
|
+
from ..models.validation_error import ValidationError
|
|
11
|
+
from ..models.validation_plan_summary import ValidationPlanSummary
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
T = TypeVar("T", bound="ValidateBlueprintResponse")
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
@_attrs_define
|
|
18
|
+
class ValidateBlueprintResponse:
|
|
19
|
+
"""
|
|
20
|
+
Attributes:
|
|
21
|
+
valid (bool): If `true`, the Blueprint validated successfully. If `false`, at least one validation error
|
|
22
|
+
occurred.
|
|
23
|
+
errors (Union[Unset, list['ValidationError']]): A list of validation errors. Only present if `valid` is `false`.
|
|
24
|
+
plan (Union[Unset, ValidationPlanSummary]):
|
|
25
|
+
"""
|
|
26
|
+
|
|
27
|
+
valid: bool
|
|
28
|
+
errors: Union[Unset, list["ValidationError"]] = UNSET
|
|
29
|
+
plan: Union[Unset, "ValidationPlanSummary"] = UNSET
|
|
30
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
31
|
+
|
|
32
|
+
def to_dict(self) -> dict[str, Any]:
|
|
33
|
+
valid = self.valid
|
|
34
|
+
|
|
35
|
+
errors: Union[Unset, list[dict[str, Any]]] = UNSET
|
|
36
|
+
if not isinstance(self.errors, Unset):
|
|
37
|
+
errors = []
|
|
38
|
+
for errors_item_data in self.errors:
|
|
39
|
+
errors_item = errors_item_data.to_dict()
|
|
40
|
+
errors.append(errors_item)
|
|
41
|
+
|
|
42
|
+
plan: Union[Unset, dict[str, Any]] = UNSET
|
|
43
|
+
if not isinstance(self.plan, Unset):
|
|
44
|
+
plan = self.plan.to_dict()
|
|
45
|
+
|
|
46
|
+
field_dict: dict[str, Any] = {}
|
|
47
|
+
field_dict.update(self.additional_properties)
|
|
48
|
+
field_dict.update(
|
|
49
|
+
{
|
|
50
|
+
"valid": valid,
|
|
51
|
+
}
|
|
52
|
+
)
|
|
53
|
+
if errors is not UNSET:
|
|
54
|
+
field_dict["errors"] = errors
|
|
55
|
+
if plan is not UNSET:
|
|
56
|
+
field_dict["plan"] = plan
|
|
57
|
+
|
|
58
|
+
return field_dict
|
|
59
|
+
|
|
60
|
+
@classmethod
|
|
61
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
62
|
+
from ..models.validation_error import ValidationError
|
|
63
|
+
from ..models.validation_plan_summary import ValidationPlanSummary
|
|
64
|
+
|
|
65
|
+
d = dict(src_dict)
|
|
66
|
+
valid = d.pop("valid")
|
|
67
|
+
|
|
68
|
+
errors = []
|
|
69
|
+
_errors = d.pop("errors", UNSET)
|
|
70
|
+
for errors_item_data in _errors or []:
|
|
71
|
+
errors_item = ValidationError.from_dict(errors_item_data)
|
|
72
|
+
|
|
73
|
+
errors.append(errors_item)
|
|
74
|
+
|
|
75
|
+
_plan = d.pop("plan", UNSET)
|
|
76
|
+
plan: Union[Unset, ValidationPlanSummary]
|
|
77
|
+
if isinstance(_plan, Unset):
|
|
78
|
+
plan = UNSET
|
|
79
|
+
else:
|
|
80
|
+
plan = ValidationPlanSummary.from_dict(_plan)
|
|
81
|
+
|
|
82
|
+
validate_blueprint_response = cls(
|
|
83
|
+
valid=valid,
|
|
84
|
+
errors=errors,
|
|
85
|
+
plan=plan,
|
|
86
|
+
)
|
|
87
|
+
|
|
88
|
+
validate_blueprint_response.additional_properties = d
|
|
89
|
+
return validate_blueprint_response
|
|
90
|
+
|
|
91
|
+
@property
|
|
92
|
+
def additional_keys(self) -> list[str]:
|
|
93
|
+
return list(self.additional_properties.keys())
|
|
94
|
+
|
|
95
|
+
def __getitem__(self, key: str) -> Any:
|
|
96
|
+
return self.additional_properties[key]
|
|
97
|
+
|
|
98
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
99
|
+
self.additional_properties[key] = value
|
|
100
|
+
|
|
101
|
+
def __delitem__(self, key: str) -> None:
|
|
102
|
+
del self.additional_properties[key]
|
|
103
|
+
|
|
104
|
+
def __contains__(self, key: str) -> bool:
|
|
105
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
from collections.abc import Mapping
|
|
2
|
+
from typing import Any, TypeVar, Union
|
|
3
|
+
|
|
4
|
+
from attrs import define as _attrs_define
|
|
5
|
+
from attrs import field as _attrs_field
|
|
6
|
+
|
|
7
|
+
from ..types import UNSET, Unset
|
|
8
|
+
|
|
9
|
+
T = TypeVar("T", bound="ValidationError")
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
@_attrs_define
|
|
13
|
+
class ValidationError:
|
|
14
|
+
"""
|
|
15
|
+
Attributes:
|
|
16
|
+
error (str): The error message
|
|
17
|
+
path (Union[Unset, str]): The path to the field with the error (e.g., `services[0].plan`)
|
|
18
|
+
line (Union[Unset, int]): The line number in the YAML file (1-indexed)
|
|
19
|
+
column (Union[Unset, int]): The column number in the YAML file (1-indexed)
|
|
20
|
+
"""
|
|
21
|
+
|
|
22
|
+
error: str
|
|
23
|
+
path: Union[Unset, str] = UNSET
|
|
24
|
+
line: Union[Unset, int] = UNSET
|
|
25
|
+
column: Union[Unset, int] = UNSET
|
|
26
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
27
|
+
|
|
28
|
+
def to_dict(self) -> dict[str, Any]:
|
|
29
|
+
error = self.error
|
|
30
|
+
|
|
31
|
+
path = self.path
|
|
32
|
+
|
|
33
|
+
line = self.line
|
|
34
|
+
|
|
35
|
+
column = self.column
|
|
36
|
+
|
|
37
|
+
field_dict: dict[str, Any] = {}
|
|
38
|
+
field_dict.update(self.additional_properties)
|
|
39
|
+
field_dict.update(
|
|
40
|
+
{
|
|
41
|
+
"error": error,
|
|
42
|
+
}
|
|
43
|
+
)
|
|
44
|
+
if path is not UNSET:
|
|
45
|
+
field_dict["path"] = path
|
|
46
|
+
if line is not UNSET:
|
|
47
|
+
field_dict["line"] = line
|
|
48
|
+
if column is not UNSET:
|
|
49
|
+
field_dict["column"] = column
|
|
50
|
+
|
|
51
|
+
return field_dict
|
|
52
|
+
|
|
53
|
+
@classmethod
|
|
54
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
55
|
+
d = dict(src_dict)
|
|
56
|
+
error = d.pop("error")
|
|
57
|
+
|
|
58
|
+
path = d.pop("path", UNSET)
|
|
59
|
+
|
|
60
|
+
line = d.pop("line", UNSET)
|
|
61
|
+
|
|
62
|
+
column = d.pop("column", UNSET)
|
|
63
|
+
|
|
64
|
+
validation_error = cls(
|
|
65
|
+
error=error,
|
|
66
|
+
path=path,
|
|
67
|
+
line=line,
|
|
68
|
+
column=column,
|
|
69
|
+
)
|
|
70
|
+
|
|
71
|
+
validation_error.additional_properties = d
|
|
72
|
+
return validation_error
|
|
73
|
+
|
|
74
|
+
@property
|
|
75
|
+
def additional_keys(self) -> list[str]:
|
|
76
|
+
return list(self.additional_properties.keys())
|
|
77
|
+
|
|
78
|
+
def __getitem__(self, key: str) -> Any:
|
|
79
|
+
return self.additional_properties[key]
|
|
80
|
+
|
|
81
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
82
|
+
self.additional_properties[key] = value
|
|
83
|
+
|
|
84
|
+
def __delitem__(self, key: str) -> None:
|
|
85
|
+
del self.additional_properties[key]
|
|
86
|
+
|
|
87
|
+
def __contains__(self, key: str) -> bool:
|
|
88
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
from collections.abc import Mapping
|
|
2
|
+
from typing import Any, TypeVar, Union, cast
|
|
3
|
+
|
|
4
|
+
from attrs import define as _attrs_define
|
|
5
|
+
from attrs import field as _attrs_field
|
|
6
|
+
|
|
7
|
+
from ..types import UNSET, Unset
|
|
8
|
+
|
|
9
|
+
T = TypeVar("T", bound="ValidationPlanSummary")
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
@_attrs_define
|
|
13
|
+
class ValidationPlanSummary:
|
|
14
|
+
"""
|
|
15
|
+
Attributes:
|
|
16
|
+
services (Union[Unset, list[str]]): The names of services that would be created as part of the Blueprint.
|
|
17
|
+
databases (Union[Unset, list[str]]): The names of Render Postgres databases that would be created as part of the
|
|
18
|
+
Blueprint.
|
|
19
|
+
key_value (Union[Unset, list[str]]): The names of Render Key Value instances that would be created as part of
|
|
20
|
+
the Blueprint.
|
|
21
|
+
env_groups (Union[Unset, list[str]]): The names of environment groups that would be created as part of the
|
|
22
|
+
Blueprint.
|
|
23
|
+
total_actions (Union[Unset, int]): The total number of actions that would be performed by the Blueprint. In
|
|
24
|
+
addition to created resources, this includes modifications to individual configuration fields.
|
|
25
|
+
"""
|
|
26
|
+
|
|
27
|
+
services: Union[Unset, list[str]] = UNSET
|
|
28
|
+
databases: Union[Unset, list[str]] = UNSET
|
|
29
|
+
key_value: Union[Unset, list[str]] = UNSET
|
|
30
|
+
env_groups: Union[Unset, list[str]] = UNSET
|
|
31
|
+
total_actions: Union[Unset, int] = UNSET
|
|
32
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
33
|
+
|
|
34
|
+
def to_dict(self) -> dict[str, Any]:
|
|
35
|
+
services: Union[Unset, list[str]] = UNSET
|
|
36
|
+
if not isinstance(self.services, Unset):
|
|
37
|
+
services = self.services
|
|
38
|
+
|
|
39
|
+
databases: Union[Unset, list[str]] = UNSET
|
|
40
|
+
if not isinstance(self.databases, Unset):
|
|
41
|
+
databases = self.databases
|
|
42
|
+
|
|
43
|
+
key_value: Union[Unset, list[str]] = UNSET
|
|
44
|
+
if not isinstance(self.key_value, Unset):
|
|
45
|
+
key_value = self.key_value
|
|
46
|
+
|
|
47
|
+
env_groups: Union[Unset, list[str]] = UNSET
|
|
48
|
+
if not isinstance(self.env_groups, Unset):
|
|
49
|
+
env_groups = self.env_groups
|
|
50
|
+
|
|
51
|
+
total_actions = self.total_actions
|
|
52
|
+
|
|
53
|
+
field_dict: dict[str, Any] = {}
|
|
54
|
+
field_dict.update(self.additional_properties)
|
|
55
|
+
field_dict.update({})
|
|
56
|
+
if services is not UNSET:
|
|
57
|
+
field_dict["services"] = services
|
|
58
|
+
if databases is not UNSET:
|
|
59
|
+
field_dict["databases"] = databases
|
|
60
|
+
if key_value is not UNSET:
|
|
61
|
+
field_dict["keyValue"] = key_value
|
|
62
|
+
if env_groups is not UNSET:
|
|
63
|
+
field_dict["envGroups"] = env_groups
|
|
64
|
+
if total_actions is not UNSET:
|
|
65
|
+
field_dict["totalActions"] = total_actions
|
|
66
|
+
|
|
67
|
+
return field_dict
|
|
68
|
+
|
|
69
|
+
@classmethod
|
|
70
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
71
|
+
d = dict(src_dict)
|
|
72
|
+
services = cast(list[str], d.pop("services", UNSET))
|
|
73
|
+
|
|
74
|
+
databases = cast(list[str], d.pop("databases", UNSET))
|
|
75
|
+
|
|
76
|
+
key_value = cast(list[str], d.pop("keyValue", UNSET))
|
|
77
|
+
|
|
78
|
+
env_groups = cast(list[str], d.pop("envGroups", UNSET))
|
|
79
|
+
|
|
80
|
+
total_actions = d.pop("totalActions", UNSET)
|
|
81
|
+
|
|
82
|
+
validation_plan_summary = cls(
|
|
83
|
+
services=services,
|
|
84
|
+
databases=databases,
|
|
85
|
+
key_value=key_value,
|
|
86
|
+
env_groups=env_groups,
|
|
87
|
+
total_actions=total_actions,
|
|
88
|
+
)
|
|
89
|
+
|
|
90
|
+
validation_plan_summary.additional_properties = d
|
|
91
|
+
return validation_plan_summary
|
|
92
|
+
|
|
93
|
+
@property
|
|
94
|
+
def additional_keys(self) -> list[str]:
|
|
95
|
+
return list(self.additional_properties.keys())
|
|
96
|
+
|
|
97
|
+
def __getitem__(self, key: str) -> Any:
|
|
98
|
+
return self.additional_properties[key]
|
|
99
|
+
|
|
100
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
101
|
+
self.additional_properties[key] = value
|
|
102
|
+
|
|
103
|
+
def __delitem__(self, key: str) -> None:
|
|
104
|
+
del self.additional_properties[key]
|
|
105
|
+
|
|
106
|
+
def __contains__(self, key: str) -> bool:
|
|
107
|
+
return key in self.additional_properties
|
|
@@ -39,8 +39,8 @@ class WebServiceDetails:
|
|
|
39
39
|
num_instances (int): For a *manually* scaled service, this is the number of instances the service is scaled to.
|
|
40
40
|
DOES NOT indicate the number of running instances for an *autoscaled* service.
|
|
41
41
|
open_ports (list['ServerPort']):
|
|
42
|
-
plan (Plan): The instance type to use
|
|
43
|
-
|
|
42
|
+
plan (Plan): The instance type to use. Note that base services on any paid instance type can't create preview
|
|
43
|
+
instances with the `free` instance type. Example: starter.
|
|
44
44
|
region (Region): Defaults to "oregon"
|
|
45
45
|
runtime (ServiceRuntime): Runtime
|
|
46
46
|
url (str):
|
|
@@ -4,7 +4,7 @@ from typing import TYPE_CHECKING, Any, TypeVar, Union
|
|
|
4
4
|
from attrs import define as _attrs_define
|
|
5
5
|
from attrs import field as _attrs_field
|
|
6
6
|
|
|
7
|
-
from ..models.
|
|
7
|
+
from ..models.plan import Plan
|
|
8
8
|
from ..models.pull_request_previews_enabled import PullRequestPreviewsEnabled
|
|
9
9
|
from ..models.render_subdomain_policy import RenderSubdomainPolicy
|
|
10
10
|
from ..models.service_runtime import ServiceRuntime
|
|
@@ -29,7 +29,8 @@ class WebServiceDetailsPATCH:
|
|
|
29
29
|
env_specific_details (Union['DockerDetailsPATCH', 'NativeEnvironmentDetailsPATCH', Unset]):
|
|
30
30
|
health_check_path (Union[Unset, str]):
|
|
31
31
|
maintenance_mode (Union[Unset, MaintenanceMode]):
|
|
32
|
-
plan (Union[Unset,
|
|
32
|
+
plan (Union[Unset, Plan]): The instance type to use. Note that base services on any paid instance type can't
|
|
33
|
+
create preview instances with the `free` instance type. Example: starter.
|
|
33
34
|
pre_deploy_command (Union[Unset, str]):
|
|
34
35
|
pull_request_previews_enabled (Union[Unset, PullRequestPreviewsEnabled]): This field has been deprecated.
|
|
35
36
|
previews.generation should be used in its place.
|
|
@@ -46,7 +47,7 @@ class WebServiceDetailsPATCH:
|
|
|
46
47
|
env_specific_details: Union["DockerDetailsPATCH", "NativeEnvironmentDetailsPATCH", Unset] = UNSET
|
|
47
48
|
health_check_path: Union[Unset, str] = UNSET
|
|
48
49
|
maintenance_mode: Union[Unset, "MaintenanceMode"] = UNSET
|
|
49
|
-
plan: Union[Unset,
|
|
50
|
+
plan: Union[Unset, Plan] = UNSET
|
|
50
51
|
pre_deploy_command: Union[Unset, str] = UNSET
|
|
51
52
|
pull_request_previews_enabled: Union[Unset, PullRequestPreviewsEnabled] = UNSET
|
|
52
53
|
previews: Union[Unset, "Previews"] = UNSET
|
|
@@ -181,11 +182,11 @@ class WebServiceDetailsPATCH:
|
|
|
181
182
|
maintenance_mode = MaintenanceMode.from_dict(_maintenance_mode)
|
|
182
183
|
|
|
183
184
|
_plan = d.pop("plan", UNSET)
|
|
184
|
-
plan: Union[Unset,
|
|
185
|
+
plan: Union[Unset, Plan]
|
|
185
186
|
if isinstance(_plan, Unset):
|
|
186
187
|
plan = UNSET
|
|
187
188
|
else:
|
|
188
|
-
plan =
|
|
189
|
+
plan = Plan(_plan)
|
|
189
190
|
|
|
190
191
|
pre_deploy_command = d.pop("preDeployCommand", UNSET)
|
|
191
192
|
|
|
@@ -4,7 +4,7 @@ from typing import TYPE_CHECKING, Any, TypeVar, Union
|
|
|
4
4
|
from attrs import define as _attrs_define
|
|
5
5
|
from attrs import field as _attrs_field
|
|
6
6
|
|
|
7
|
-
from ..models.
|
|
7
|
+
from ..models.plan import Plan
|
|
8
8
|
from ..models.pull_request_previews_enabled import PullRequestPreviewsEnabled
|
|
9
9
|
from ..models.region import Region
|
|
10
10
|
from ..models.render_subdomain_policy import RenderSubdomainPolicy
|
|
@@ -37,7 +37,8 @@ class WebServiceDetailsPOST:
|
|
|
37
37
|
health_check_path (Union[Unset, str]):
|
|
38
38
|
maintenance_mode (Union[Unset, MaintenanceMode]):
|
|
39
39
|
num_instances (Union[Unset, int]): Defaults to 1
|
|
40
|
-
plan (Union[Unset,
|
|
40
|
+
plan (Union[Unset, Plan]): The instance type to use. Note that base services on any paid instance type can't
|
|
41
|
+
create preview instances with the `free` instance type. Example: starter.
|
|
41
42
|
pre_deploy_command (Union[Unset, str]):
|
|
42
43
|
pull_request_previews_enabled (Union[Unset, PullRequestPreviewsEnabled]): This field has been deprecated.
|
|
43
44
|
previews.generation should be used in its place.
|
|
@@ -58,7 +59,7 @@ class WebServiceDetailsPOST:
|
|
|
58
59
|
health_check_path: Union[Unset, str] = UNSET
|
|
59
60
|
maintenance_mode: Union[Unset, "MaintenanceMode"] = UNSET
|
|
60
61
|
num_instances: Union[Unset, int] = UNSET
|
|
61
|
-
plan: Union[Unset,
|
|
62
|
+
plan: Union[Unset, Plan] = UNSET
|
|
62
63
|
pre_deploy_command: Union[Unset, str] = UNSET
|
|
63
64
|
pull_request_previews_enabled: Union[Unset, PullRequestPreviewsEnabled] = UNSET
|
|
64
65
|
previews: Union[Unset, "Previews"] = UNSET
|
|
@@ -239,11 +240,11 @@ class WebServiceDetailsPOST:
|
|
|
239
240
|
num_instances = d.pop("numInstances", UNSET)
|
|
240
241
|
|
|
241
242
|
_plan = d.pop("plan", UNSET)
|
|
242
|
-
plan: Union[Unset,
|
|
243
|
+
plan: Union[Unset, Plan]
|
|
243
244
|
if isinstance(_plan, Unset):
|
|
244
245
|
plan = UNSET
|
|
245
246
|
else:
|
|
246
|
-
plan =
|
|
247
|
+
plan = Plan(_plan)
|
|
247
248
|
|
|
248
249
|
pre_deploy_command = d.pop("preDeployCommand", UNSET)
|
|
249
250
|
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
import datetime
|
|
2
|
+
from collections.abc import Mapping
|
|
3
|
+
from typing import TYPE_CHECKING, Any, TypeVar, Union
|
|
4
|
+
|
|
5
|
+
from attrs import define as _attrs_define
|
|
6
|
+
from attrs import field as _attrs_field
|
|
7
|
+
from dateutil.parser import isoparse
|
|
8
|
+
|
|
9
|
+
from ..models.region import Region
|
|
10
|
+
from ..types import UNSET, Unset
|
|
11
|
+
|
|
12
|
+
if TYPE_CHECKING:
|
|
13
|
+
from ..models.build_config import BuildConfig
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
T = TypeVar("T", bound="Workflow")
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
@_attrs_define
|
|
20
|
+
class Workflow:
|
|
21
|
+
"""
|
|
22
|
+
Attributes:
|
|
23
|
+
id (str):
|
|
24
|
+
name (str):
|
|
25
|
+
owner_id (str):
|
|
26
|
+
created_at (datetime.datetime):
|
|
27
|
+
updated_at (datetime.datetime):
|
|
28
|
+
build_config (BuildConfig):
|
|
29
|
+
run_command (str): Command to run the workflow.
|
|
30
|
+
region (Region): Defaults to "oregon"
|
|
31
|
+
environment_id (Union[Unset, str]):
|
|
32
|
+
slug (Union[Unset, str]):
|
|
33
|
+
"""
|
|
34
|
+
|
|
35
|
+
id: str
|
|
36
|
+
name: str
|
|
37
|
+
owner_id: str
|
|
38
|
+
created_at: datetime.datetime
|
|
39
|
+
updated_at: datetime.datetime
|
|
40
|
+
build_config: "BuildConfig"
|
|
41
|
+
run_command: str
|
|
42
|
+
region: Region
|
|
43
|
+
environment_id: Union[Unset, str] = UNSET
|
|
44
|
+
slug: Union[Unset, str] = UNSET
|
|
45
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
46
|
+
|
|
47
|
+
def to_dict(self) -> dict[str, Any]:
|
|
48
|
+
id = self.id
|
|
49
|
+
|
|
50
|
+
name = self.name
|
|
51
|
+
|
|
52
|
+
owner_id = self.owner_id
|
|
53
|
+
|
|
54
|
+
created_at = self.created_at.isoformat()
|
|
55
|
+
|
|
56
|
+
updated_at = self.updated_at.isoformat()
|
|
57
|
+
|
|
58
|
+
build_config = self.build_config.to_dict()
|
|
59
|
+
|
|
60
|
+
run_command = self.run_command
|
|
61
|
+
|
|
62
|
+
region = self.region.value
|
|
63
|
+
|
|
64
|
+
environment_id = self.environment_id
|
|
65
|
+
|
|
66
|
+
slug = self.slug
|
|
67
|
+
|
|
68
|
+
field_dict: dict[str, Any] = {}
|
|
69
|
+
field_dict.update(self.additional_properties)
|
|
70
|
+
field_dict.update(
|
|
71
|
+
{
|
|
72
|
+
"id": id,
|
|
73
|
+
"name": name,
|
|
74
|
+
"ownerId": owner_id,
|
|
75
|
+
"createdAt": created_at,
|
|
76
|
+
"updatedAt": updated_at,
|
|
77
|
+
"buildConfig": build_config,
|
|
78
|
+
"runCommand": run_command,
|
|
79
|
+
"region": region,
|
|
80
|
+
}
|
|
81
|
+
)
|
|
82
|
+
if environment_id is not UNSET:
|
|
83
|
+
field_dict["environmentId"] = environment_id
|
|
84
|
+
if slug is not UNSET:
|
|
85
|
+
field_dict["slug"] = slug
|
|
86
|
+
|
|
87
|
+
return field_dict
|
|
88
|
+
|
|
89
|
+
@classmethod
|
|
90
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
91
|
+
from ..models.build_config import BuildConfig
|
|
92
|
+
|
|
93
|
+
d = dict(src_dict)
|
|
94
|
+
id = d.pop("id")
|
|
95
|
+
|
|
96
|
+
name = d.pop("name")
|
|
97
|
+
|
|
98
|
+
owner_id = d.pop("ownerId")
|
|
99
|
+
|
|
100
|
+
created_at = isoparse(d.pop("createdAt"))
|
|
101
|
+
|
|
102
|
+
updated_at = isoparse(d.pop("updatedAt"))
|
|
103
|
+
|
|
104
|
+
build_config = BuildConfig.from_dict(d.pop("buildConfig"))
|
|
105
|
+
|
|
106
|
+
run_command = d.pop("runCommand")
|
|
107
|
+
|
|
108
|
+
region = Region(d.pop("region"))
|
|
109
|
+
|
|
110
|
+
environment_id = d.pop("environmentId", UNSET)
|
|
111
|
+
|
|
112
|
+
slug = d.pop("slug", UNSET)
|
|
113
|
+
|
|
114
|
+
workflow = cls(
|
|
115
|
+
id=id,
|
|
116
|
+
name=name,
|
|
117
|
+
owner_id=owner_id,
|
|
118
|
+
created_at=created_at,
|
|
119
|
+
updated_at=updated_at,
|
|
120
|
+
build_config=build_config,
|
|
121
|
+
run_command=run_command,
|
|
122
|
+
region=region,
|
|
123
|
+
environment_id=environment_id,
|
|
124
|
+
slug=slug,
|
|
125
|
+
)
|
|
126
|
+
|
|
127
|
+
workflow.additional_properties = d
|
|
128
|
+
return workflow
|
|
129
|
+
|
|
130
|
+
@property
|
|
131
|
+
def additional_keys(self) -> list[str]:
|
|
132
|
+
return list(self.additional_properties.keys())
|
|
133
|
+
|
|
134
|
+
def __getitem__(self, key: str) -> Any:
|
|
135
|
+
return self.additional_properties[key]
|
|
136
|
+
|
|
137
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
138
|
+
self.additional_properties[key] = value
|
|
139
|
+
|
|
140
|
+
def __delitem__(self, key: str) -> None:
|
|
141
|
+
del self.additional_properties[key]
|
|
142
|
+
|
|
143
|
+
def __contains__(self, key: str) -> bool:
|
|
144
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
from collections.abc import Mapping
|
|
2
|
+
from typing import TYPE_CHECKING, Any, TypeVar
|
|
3
|
+
|
|
4
|
+
from attrs import define as _attrs_define
|
|
5
|
+
from attrs import field as _attrs_field
|
|
6
|
+
|
|
7
|
+
from ..models.region import Region
|
|
8
|
+
|
|
9
|
+
if TYPE_CHECKING:
|
|
10
|
+
from ..models.build_config import BuildConfig
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
T = TypeVar("T", bound="WorkflowCreate")
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
@_attrs_define
|
|
17
|
+
class WorkflowCreate:
|
|
18
|
+
"""
|
|
19
|
+
Attributes:
|
|
20
|
+
name (str):
|
|
21
|
+
owner_id (str):
|
|
22
|
+
build_config (BuildConfig):
|
|
23
|
+
run_command (str): The command to run the workflow
|
|
24
|
+
region (Region): Defaults to "oregon"
|
|
25
|
+
"""
|
|
26
|
+
|
|
27
|
+
name: str
|
|
28
|
+
owner_id: str
|
|
29
|
+
build_config: "BuildConfig"
|
|
30
|
+
run_command: str
|
|
31
|
+
region: Region
|
|
32
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
33
|
+
|
|
34
|
+
def to_dict(self) -> dict[str, Any]:
|
|
35
|
+
name = self.name
|
|
36
|
+
|
|
37
|
+
owner_id = self.owner_id
|
|
38
|
+
|
|
39
|
+
build_config = self.build_config.to_dict()
|
|
40
|
+
|
|
41
|
+
run_command = self.run_command
|
|
42
|
+
|
|
43
|
+
region = self.region.value
|
|
44
|
+
|
|
45
|
+
field_dict: dict[str, Any] = {}
|
|
46
|
+
field_dict.update(self.additional_properties)
|
|
47
|
+
field_dict.update(
|
|
48
|
+
{
|
|
49
|
+
"name": name,
|
|
50
|
+
"ownerId": owner_id,
|
|
51
|
+
"buildConfig": build_config,
|
|
52
|
+
"runCommand": run_command,
|
|
53
|
+
"region": region,
|
|
54
|
+
}
|
|
55
|
+
)
|
|
56
|
+
|
|
57
|
+
return field_dict
|
|
58
|
+
|
|
59
|
+
@classmethod
|
|
60
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
61
|
+
from ..models.build_config import BuildConfig
|
|
62
|
+
|
|
63
|
+
d = dict(src_dict)
|
|
64
|
+
name = d.pop("name")
|
|
65
|
+
|
|
66
|
+
owner_id = d.pop("ownerId")
|
|
67
|
+
|
|
68
|
+
build_config = BuildConfig.from_dict(d.pop("buildConfig"))
|
|
69
|
+
|
|
70
|
+
run_command = d.pop("runCommand")
|
|
71
|
+
|
|
72
|
+
region = Region(d.pop("region"))
|
|
73
|
+
|
|
74
|
+
workflow_create = cls(
|
|
75
|
+
name=name,
|
|
76
|
+
owner_id=owner_id,
|
|
77
|
+
build_config=build_config,
|
|
78
|
+
run_command=run_command,
|
|
79
|
+
region=region,
|
|
80
|
+
)
|
|
81
|
+
|
|
82
|
+
workflow_create.additional_properties = d
|
|
83
|
+
return workflow_create
|
|
84
|
+
|
|
85
|
+
@property
|
|
86
|
+
def additional_keys(self) -> list[str]:
|
|
87
|
+
return list(self.additional_properties.keys())
|
|
88
|
+
|
|
89
|
+
def __getitem__(self, key: str) -> Any:
|
|
90
|
+
return self.additional_properties[key]
|
|
91
|
+
|
|
92
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
93
|
+
self.additional_properties[key] = value
|
|
94
|
+
|
|
95
|
+
def __delitem__(self, key: str) -> None:
|
|
96
|
+
del self.additional_properties[key]
|
|
97
|
+
|
|
98
|
+
def __contains__(self, key: str) -> bool:
|
|
99
|
+
return key in self.additional_properties
|