wds-client 0.29.0__py3-none-any.whl → 0.31.0__py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- wds_client/__init__.py +1 -8
- wds_client/api/__init__.py +0 -1
- wds_client/api_client.py +1 -1
- wds_client/configuration.py +1 -1
- wds_client/models/__init__.py +0 -6
- {wds_client-0.29.0.dist-info → wds_client-0.31.0.dist-info}/METADATA +1 -1
- {wds_client-0.29.0.dist-info → wds_client-0.31.0.dist-info}/RECORD +9 -16
- wds_client/api/cloning_api.py +0 -851
- wds_client/models/backup_job.py +0 -112
- wds_client/models/backup_response.py +0 -91
- wds_client/models/backup_restore_request.py +0 -89
- wds_client/models/clone_job.py +0 -112
- wds_client/models/clone_response.py +0 -89
- wds_client/models/job.py +0 -104
- {wds_client-0.29.0.dist-info → wds_client-0.31.0.dist-info}/WHEEL +0 -0
- {wds_client-0.29.0.dist-info → wds_client-0.31.0.dist-info}/top_level.txt +0 -0
wds_client/models/backup_job.py
DELETED
@@ -1,112 +0,0 @@
|
|
1
|
-
# coding: utf-8
|
2
|
-
|
3
|
-
"""
|
4
|
-
Workspace Data Service
|
5
|
-
|
6
|
-
This page lists current APIs. All v0.2 APIs are subject to change without notice. Changelog at [https://github.com/DataBiosphere/terra-workspace-data-service/releases](https://github.com/DataBiosphere/terra-workspace-data-service/releases)
|
7
|
-
|
8
|
-
The version of the OpenAPI document: v0.2
|
9
|
-
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
10
|
-
|
11
|
-
Do not edit the class manually.
|
12
|
-
""" # noqa: E501
|
13
|
-
|
14
|
-
|
15
|
-
from __future__ import annotations
|
16
|
-
import pprint
|
17
|
-
import re # noqa: F401
|
18
|
-
import json
|
19
|
-
|
20
|
-
from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
|
21
|
-
from typing import Any, ClassVar, Dict, List, Optional
|
22
|
-
from wds_client.models.backup_response import BackupResponse
|
23
|
-
from typing import Optional, Set
|
24
|
-
from typing_extensions import Self
|
25
|
-
|
26
|
-
class BackupJob(BaseModel):
|
27
|
-
"""
|
28
|
-
BackupJob
|
29
|
-
""" # noqa: E501
|
30
|
-
job_id: StrictStr = Field(alias="jobId")
|
31
|
-
job_type: Optional[StrictStr] = Field(default=None, alias="jobType")
|
32
|
-
status: StrictStr
|
33
|
-
created: StrictStr
|
34
|
-
updated: StrictStr
|
35
|
-
error_message: Optional[StrictStr] = Field(default=None, alias="errorMessage")
|
36
|
-
input: Optional[Dict[str, Any]] = Field(default=None, description="Input arguments; expected to be empty.")
|
37
|
-
result: Optional[BackupResponse] = None
|
38
|
-
__properties: ClassVar[List[str]] = ["jobId", "jobType", "status", "created", "updated", "errorMessage", "input", "result"]
|
39
|
-
|
40
|
-
@field_validator('status')
|
41
|
-
def status_validate_enum(cls, value):
|
42
|
-
"""Validates the enum"""
|
43
|
-
if value not in set(['QUEUED', 'RUNNING', 'SUCCEEDED', 'ERROR', 'CANCELLED', 'UNKNOWN']):
|
44
|
-
raise ValueError("must be one of enum values ('QUEUED', 'RUNNING', 'SUCCEEDED', 'ERROR', 'CANCELLED', 'UNKNOWN')")
|
45
|
-
return value
|
46
|
-
|
47
|
-
model_config = ConfigDict(
|
48
|
-
populate_by_name=True,
|
49
|
-
validate_assignment=True,
|
50
|
-
protected_namespaces=(),
|
51
|
-
)
|
52
|
-
|
53
|
-
|
54
|
-
def to_str(self) -> str:
|
55
|
-
"""Returns the string representation of the model using alias"""
|
56
|
-
return pprint.pformat(self.model_dump(by_alias=True))
|
57
|
-
|
58
|
-
def to_json(self) -> str:
|
59
|
-
"""Returns the JSON representation of the model using alias"""
|
60
|
-
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
61
|
-
return json.dumps(self.to_dict())
|
62
|
-
|
63
|
-
@classmethod
|
64
|
-
def from_json(cls, json_str: str) -> Optional[Self]:
|
65
|
-
"""Create an instance of BackupJob from a JSON string"""
|
66
|
-
return cls.from_dict(json.loads(json_str))
|
67
|
-
|
68
|
-
def to_dict(self) -> Dict[str, Any]:
|
69
|
-
"""Return the dictionary representation of the model using alias.
|
70
|
-
|
71
|
-
This has the following differences from calling pydantic's
|
72
|
-
`self.model_dump(by_alias=True)`:
|
73
|
-
|
74
|
-
* `None` is only added to the output dict for nullable fields that
|
75
|
-
were set at model initialization. Other fields with value `None`
|
76
|
-
are ignored.
|
77
|
-
"""
|
78
|
-
excluded_fields: Set[str] = set([
|
79
|
-
])
|
80
|
-
|
81
|
-
_dict = self.model_dump(
|
82
|
-
by_alias=True,
|
83
|
-
exclude=excluded_fields,
|
84
|
-
exclude_none=True,
|
85
|
-
)
|
86
|
-
# override the default output from pydantic by calling `to_dict()` of result
|
87
|
-
if self.result:
|
88
|
-
_dict['result'] = self.result.to_dict()
|
89
|
-
return _dict
|
90
|
-
|
91
|
-
@classmethod
|
92
|
-
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
93
|
-
"""Create an instance of BackupJob from a dict"""
|
94
|
-
if obj is None:
|
95
|
-
return None
|
96
|
-
|
97
|
-
if not isinstance(obj, dict):
|
98
|
-
return cls.model_validate(obj)
|
99
|
-
|
100
|
-
_obj = cls.model_validate({
|
101
|
-
"jobId": obj.get("jobId"),
|
102
|
-
"jobType": obj.get("jobType"),
|
103
|
-
"status": obj.get("status"),
|
104
|
-
"created": obj.get("created"),
|
105
|
-
"updated": obj.get("updated"),
|
106
|
-
"errorMessage": obj.get("errorMessage"),
|
107
|
-
"input": obj.get("input"),
|
108
|
-
"result": BackupResponse.from_dict(obj["result"]) if obj.get("result") is not None else None
|
109
|
-
})
|
110
|
-
return _obj
|
111
|
-
|
112
|
-
|
@@ -1,91 +0,0 @@
|
|
1
|
-
# coding: utf-8
|
2
|
-
|
3
|
-
"""
|
4
|
-
Workspace Data Service
|
5
|
-
|
6
|
-
This page lists current APIs. All v0.2 APIs are subject to change without notice. Changelog at [https://github.com/DataBiosphere/terra-workspace-data-service/releases](https://github.com/DataBiosphere/terra-workspace-data-service/releases)
|
7
|
-
|
8
|
-
The version of the OpenAPI document: v0.2
|
9
|
-
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
10
|
-
|
11
|
-
Do not edit the class manually.
|
12
|
-
""" # noqa: E501
|
13
|
-
|
14
|
-
|
15
|
-
from __future__ import annotations
|
16
|
-
import pprint
|
17
|
-
import re # noqa: F401
|
18
|
-
import json
|
19
|
-
|
20
|
-
from pydantic import BaseModel, ConfigDict, Field, StrictStr
|
21
|
-
from typing import Any, ClassVar, Dict, List, Optional
|
22
|
-
from typing import Optional, Set
|
23
|
-
from typing_extensions import Self
|
24
|
-
|
25
|
-
class BackupResponse(BaseModel):
|
26
|
-
"""
|
27
|
-
BackupResponse
|
28
|
-
""" # noqa: E501
|
29
|
-
filename: Optional[StrictStr] = Field(default=None, description="backup location")
|
30
|
-
requester: Optional[StrictStr] = Field(default=None, description="workspace which initiated the backup")
|
31
|
-
description: Optional[StrictStr] = Field(default=None, description="description of this backup")
|
32
|
-
__properties: ClassVar[List[str]] = ["filename", "requester", "description"]
|
33
|
-
|
34
|
-
model_config = ConfigDict(
|
35
|
-
populate_by_name=True,
|
36
|
-
validate_assignment=True,
|
37
|
-
protected_namespaces=(),
|
38
|
-
)
|
39
|
-
|
40
|
-
|
41
|
-
def to_str(self) -> str:
|
42
|
-
"""Returns the string representation of the model using alias"""
|
43
|
-
return pprint.pformat(self.model_dump(by_alias=True))
|
44
|
-
|
45
|
-
def to_json(self) -> str:
|
46
|
-
"""Returns the JSON representation of the model using alias"""
|
47
|
-
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
48
|
-
return json.dumps(self.to_dict())
|
49
|
-
|
50
|
-
@classmethod
|
51
|
-
def from_json(cls, json_str: str) -> Optional[Self]:
|
52
|
-
"""Create an instance of BackupResponse from a JSON string"""
|
53
|
-
return cls.from_dict(json.loads(json_str))
|
54
|
-
|
55
|
-
def to_dict(self) -> Dict[str, Any]:
|
56
|
-
"""Return the dictionary representation of the model using alias.
|
57
|
-
|
58
|
-
This has the following differences from calling pydantic's
|
59
|
-
`self.model_dump(by_alias=True)`:
|
60
|
-
|
61
|
-
* `None` is only added to the output dict for nullable fields that
|
62
|
-
were set at model initialization. Other fields with value `None`
|
63
|
-
are ignored.
|
64
|
-
"""
|
65
|
-
excluded_fields: Set[str] = set([
|
66
|
-
])
|
67
|
-
|
68
|
-
_dict = self.model_dump(
|
69
|
-
by_alias=True,
|
70
|
-
exclude=excluded_fields,
|
71
|
-
exclude_none=True,
|
72
|
-
)
|
73
|
-
return _dict
|
74
|
-
|
75
|
-
@classmethod
|
76
|
-
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
77
|
-
"""Create an instance of BackupResponse from a dict"""
|
78
|
-
if obj is None:
|
79
|
-
return None
|
80
|
-
|
81
|
-
if not isinstance(obj, dict):
|
82
|
-
return cls.model_validate(obj)
|
83
|
-
|
84
|
-
_obj = cls.model_validate({
|
85
|
-
"filename": obj.get("filename"),
|
86
|
-
"requester": obj.get("requester"),
|
87
|
-
"description": obj.get("description")
|
88
|
-
})
|
89
|
-
return _obj
|
90
|
-
|
91
|
-
|
@@ -1,89 +0,0 @@
|
|
1
|
-
# coding: utf-8
|
2
|
-
|
3
|
-
"""
|
4
|
-
Workspace Data Service
|
5
|
-
|
6
|
-
This page lists current APIs. All v0.2 APIs are subject to change without notice. Changelog at [https://github.com/DataBiosphere/terra-workspace-data-service/releases](https://github.com/DataBiosphere/terra-workspace-data-service/releases)
|
7
|
-
|
8
|
-
The version of the OpenAPI document: v0.2
|
9
|
-
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
10
|
-
|
11
|
-
Do not edit the class manually.
|
12
|
-
""" # noqa: E501
|
13
|
-
|
14
|
-
|
15
|
-
from __future__ import annotations
|
16
|
-
import pprint
|
17
|
-
import re # noqa: F401
|
18
|
-
import json
|
19
|
-
|
20
|
-
from pydantic import BaseModel, ConfigDict, Field, StrictStr
|
21
|
-
from typing import Any, ClassVar, Dict, List, Optional
|
22
|
-
from typing import Optional, Set
|
23
|
-
from typing_extensions import Self
|
24
|
-
|
25
|
-
class BackupRestoreRequest(BaseModel):
|
26
|
-
"""
|
27
|
-
BackupRestoreRequest
|
28
|
-
""" # noqa: E501
|
29
|
-
requesting_workspace_id: Optional[StrictStr] = Field(default=None, description="workspace requesting the backup. Optional; defaults to the workspace in which this WDS is running.", alias="requestingWorkspaceId")
|
30
|
-
description: Optional[StrictStr] = Field(default=None, description="User-friendly description to associate with this backup. Optional.")
|
31
|
-
__properties: ClassVar[List[str]] = ["requestingWorkspaceId", "description"]
|
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 BackupRestoreRequest 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 BackupRestoreRequest 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
|
-
"requestingWorkspaceId": obj.get("requestingWorkspaceId"),
|
85
|
-
"description": obj.get("description")
|
86
|
-
})
|
87
|
-
return _obj
|
88
|
-
|
89
|
-
|
wds_client/models/clone_job.py
DELETED
@@ -1,112 +0,0 @@
|
|
1
|
-
# coding: utf-8
|
2
|
-
|
3
|
-
"""
|
4
|
-
Workspace Data Service
|
5
|
-
|
6
|
-
This page lists current APIs. All v0.2 APIs are subject to change without notice. Changelog at [https://github.com/DataBiosphere/terra-workspace-data-service/releases](https://github.com/DataBiosphere/terra-workspace-data-service/releases)
|
7
|
-
|
8
|
-
The version of the OpenAPI document: v0.2
|
9
|
-
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
10
|
-
|
11
|
-
Do not edit the class manually.
|
12
|
-
""" # noqa: E501
|
13
|
-
|
14
|
-
|
15
|
-
from __future__ import annotations
|
16
|
-
import pprint
|
17
|
-
import re # noqa: F401
|
18
|
-
import json
|
19
|
-
|
20
|
-
from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
|
21
|
-
from typing import Any, ClassVar, Dict, List, Optional
|
22
|
-
from wds_client.models.clone_response import CloneResponse
|
23
|
-
from typing import Optional, Set
|
24
|
-
from typing_extensions import Self
|
25
|
-
|
26
|
-
class CloneJob(BaseModel):
|
27
|
-
"""
|
28
|
-
CloneJob
|
29
|
-
""" # noqa: E501
|
30
|
-
job_id: StrictStr = Field(alias="jobId")
|
31
|
-
job_type: Optional[StrictStr] = Field(default=None, alias="jobType")
|
32
|
-
status: StrictStr
|
33
|
-
created: StrictStr
|
34
|
-
updated: StrictStr
|
35
|
-
error_message: Optional[StrictStr] = Field(default=None, alias="errorMessage")
|
36
|
-
input: Optional[Dict[str, Any]] = Field(default=None, description="Input arguments; expected to be empty.")
|
37
|
-
result: Optional[CloneResponse] = None
|
38
|
-
__properties: ClassVar[List[str]] = ["jobId", "jobType", "status", "created", "updated", "errorMessage", "input", "result"]
|
39
|
-
|
40
|
-
@field_validator('status')
|
41
|
-
def status_validate_enum(cls, value):
|
42
|
-
"""Validates the enum"""
|
43
|
-
if value not in set(['QUEUED', 'RUNNING', 'SUCCEEDED', 'ERROR', 'CANCELLED', 'UNKNOWN']):
|
44
|
-
raise ValueError("must be one of enum values ('QUEUED', 'RUNNING', 'SUCCEEDED', 'ERROR', 'CANCELLED', 'UNKNOWN')")
|
45
|
-
return value
|
46
|
-
|
47
|
-
model_config = ConfigDict(
|
48
|
-
populate_by_name=True,
|
49
|
-
validate_assignment=True,
|
50
|
-
protected_namespaces=(),
|
51
|
-
)
|
52
|
-
|
53
|
-
|
54
|
-
def to_str(self) -> str:
|
55
|
-
"""Returns the string representation of the model using alias"""
|
56
|
-
return pprint.pformat(self.model_dump(by_alias=True))
|
57
|
-
|
58
|
-
def to_json(self) -> str:
|
59
|
-
"""Returns the JSON representation of the model using alias"""
|
60
|
-
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
61
|
-
return json.dumps(self.to_dict())
|
62
|
-
|
63
|
-
@classmethod
|
64
|
-
def from_json(cls, json_str: str) -> Optional[Self]:
|
65
|
-
"""Create an instance of CloneJob from a JSON string"""
|
66
|
-
return cls.from_dict(json.loads(json_str))
|
67
|
-
|
68
|
-
def to_dict(self) -> Dict[str, Any]:
|
69
|
-
"""Return the dictionary representation of the model using alias.
|
70
|
-
|
71
|
-
This has the following differences from calling pydantic's
|
72
|
-
`self.model_dump(by_alias=True)`:
|
73
|
-
|
74
|
-
* `None` is only added to the output dict for nullable fields that
|
75
|
-
were set at model initialization. Other fields with value `None`
|
76
|
-
are ignored.
|
77
|
-
"""
|
78
|
-
excluded_fields: Set[str] = set([
|
79
|
-
])
|
80
|
-
|
81
|
-
_dict = self.model_dump(
|
82
|
-
by_alias=True,
|
83
|
-
exclude=excluded_fields,
|
84
|
-
exclude_none=True,
|
85
|
-
)
|
86
|
-
# override the default output from pydantic by calling `to_dict()` of result
|
87
|
-
if self.result:
|
88
|
-
_dict['result'] = self.result.to_dict()
|
89
|
-
return _dict
|
90
|
-
|
91
|
-
@classmethod
|
92
|
-
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
93
|
-
"""Create an instance of CloneJob from a dict"""
|
94
|
-
if obj is None:
|
95
|
-
return None
|
96
|
-
|
97
|
-
if not isinstance(obj, dict):
|
98
|
-
return cls.model_validate(obj)
|
99
|
-
|
100
|
-
_obj = cls.model_validate({
|
101
|
-
"jobId": obj.get("jobId"),
|
102
|
-
"jobType": obj.get("jobType"),
|
103
|
-
"status": obj.get("status"),
|
104
|
-
"created": obj.get("created"),
|
105
|
-
"updated": obj.get("updated"),
|
106
|
-
"errorMessage": obj.get("errorMessage"),
|
107
|
-
"input": obj.get("input"),
|
108
|
-
"result": CloneResponse.from_dict(obj["result"]) if obj.get("result") is not None else None
|
109
|
-
})
|
110
|
-
return _obj
|
111
|
-
|
112
|
-
|
@@ -1,89 +0,0 @@
|
|
1
|
-
# coding: utf-8
|
2
|
-
|
3
|
-
"""
|
4
|
-
Workspace Data Service
|
5
|
-
|
6
|
-
This page lists current APIs. All v0.2 APIs are subject to change without notice. Changelog at [https://github.com/DataBiosphere/terra-workspace-data-service/releases](https://github.com/DataBiosphere/terra-workspace-data-service/releases)
|
7
|
-
|
8
|
-
The version of the OpenAPI document: v0.2
|
9
|
-
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
10
|
-
|
11
|
-
Do not edit the class manually.
|
12
|
-
""" # noqa: E501
|
13
|
-
|
14
|
-
|
15
|
-
from __future__ import annotations
|
16
|
-
import pprint
|
17
|
-
import re # noqa: F401
|
18
|
-
import json
|
19
|
-
|
20
|
-
from pydantic import BaseModel, ConfigDict, Field, StrictStr
|
21
|
-
from typing import Any, ClassVar, Dict, List, Optional
|
22
|
-
from typing import Optional, Set
|
23
|
-
from typing_extensions import Self
|
24
|
-
|
25
|
-
class CloneResponse(BaseModel):
|
26
|
-
"""
|
27
|
-
CloneResponse
|
28
|
-
""" # noqa: E501
|
29
|
-
sourceworkspaceid: Optional[StrictStr] = Field(default=None, description="workspace which initiated the clone")
|
30
|
-
clonestatus: Optional[StrictStr] = Field(default=None, description="description of this clone status")
|
31
|
-
__properties: ClassVar[List[str]] = ["sourceworkspaceid", "clonestatus"]
|
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 CloneResponse 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 CloneResponse 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
|
-
"sourceworkspaceid": obj.get("sourceworkspaceid"),
|
85
|
-
"clonestatus": obj.get("clonestatus")
|
86
|
-
})
|
87
|
-
return _obj
|
88
|
-
|
89
|
-
|
wds_client/models/job.py
DELETED
@@ -1,104 +0,0 @@
|
|
1
|
-
# coding: utf-8
|
2
|
-
|
3
|
-
"""
|
4
|
-
Workspace Data Service
|
5
|
-
|
6
|
-
This page lists current APIs. All v0.2 APIs are subject to change without notice. Changelog at [https://github.com/DataBiosphere/terra-workspace-data-service/releases](https://github.com/DataBiosphere/terra-workspace-data-service/releases)
|
7
|
-
|
8
|
-
The version of the OpenAPI document: v0.2
|
9
|
-
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
10
|
-
|
11
|
-
Do not edit the class manually.
|
12
|
-
""" # noqa: E501
|
13
|
-
|
14
|
-
|
15
|
-
from __future__ import annotations
|
16
|
-
import pprint
|
17
|
-
import re # noqa: F401
|
18
|
-
import json
|
19
|
-
|
20
|
-
from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
|
21
|
-
from typing import Any, ClassVar, Dict, List, Optional
|
22
|
-
from typing import Optional, Set
|
23
|
-
from typing_extensions import Self
|
24
|
-
|
25
|
-
class Job(BaseModel):
|
26
|
-
"""
|
27
|
-
Job
|
28
|
-
""" # noqa: E501
|
29
|
-
job_id: StrictStr = Field(alias="jobId")
|
30
|
-
job_type: Optional[StrictStr] = Field(default=None, alias="jobType")
|
31
|
-
status: StrictStr
|
32
|
-
created: StrictStr
|
33
|
-
updated: StrictStr
|
34
|
-
error_message: Optional[StrictStr] = Field(default=None, alias="errorMessage")
|
35
|
-
__properties: ClassVar[List[str]] = ["jobId", "jobType", "status", "created", "updated", "errorMessage"]
|
36
|
-
|
37
|
-
@field_validator('status')
|
38
|
-
def status_validate_enum(cls, value):
|
39
|
-
"""Validates the enum"""
|
40
|
-
if value not in set(['QUEUED', 'RUNNING', 'SUCCEEDED', 'ERROR', 'CANCELLED', 'UNKNOWN']):
|
41
|
-
raise ValueError("must be one of enum values ('QUEUED', 'RUNNING', 'SUCCEEDED', 'ERROR', 'CANCELLED', 'UNKNOWN')")
|
42
|
-
return value
|
43
|
-
|
44
|
-
model_config = ConfigDict(
|
45
|
-
populate_by_name=True,
|
46
|
-
validate_assignment=True,
|
47
|
-
protected_namespaces=(),
|
48
|
-
)
|
49
|
-
|
50
|
-
|
51
|
-
def to_str(self) -> str:
|
52
|
-
"""Returns the string representation of the model using alias"""
|
53
|
-
return pprint.pformat(self.model_dump(by_alias=True))
|
54
|
-
|
55
|
-
def to_json(self) -> str:
|
56
|
-
"""Returns the JSON representation of the model using alias"""
|
57
|
-
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
58
|
-
return json.dumps(self.to_dict())
|
59
|
-
|
60
|
-
@classmethod
|
61
|
-
def from_json(cls, json_str: str) -> Optional[Self]:
|
62
|
-
"""Create an instance of Job from a JSON string"""
|
63
|
-
return cls.from_dict(json.loads(json_str))
|
64
|
-
|
65
|
-
def to_dict(self) -> Dict[str, Any]:
|
66
|
-
"""Return the dictionary representation of the model using alias.
|
67
|
-
|
68
|
-
This has the following differences from calling pydantic's
|
69
|
-
`self.model_dump(by_alias=True)`:
|
70
|
-
|
71
|
-
* `None` is only added to the output dict for nullable fields that
|
72
|
-
were set at model initialization. Other fields with value `None`
|
73
|
-
are ignored.
|
74
|
-
"""
|
75
|
-
excluded_fields: Set[str] = set([
|
76
|
-
])
|
77
|
-
|
78
|
-
_dict = self.model_dump(
|
79
|
-
by_alias=True,
|
80
|
-
exclude=excluded_fields,
|
81
|
-
exclude_none=True,
|
82
|
-
)
|
83
|
-
return _dict
|
84
|
-
|
85
|
-
@classmethod
|
86
|
-
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
87
|
-
"""Create an instance of Job from a dict"""
|
88
|
-
if obj is None:
|
89
|
-
return None
|
90
|
-
|
91
|
-
if not isinstance(obj, dict):
|
92
|
-
return cls.model_validate(obj)
|
93
|
-
|
94
|
-
_obj = cls.model_validate({
|
95
|
-
"jobId": obj.get("jobId"),
|
96
|
-
"jobType": obj.get("jobType"),
|
97
|
-
"status": obj.get("status"),
|
98
|
-
"created": obj.get("created"),
|
99
|
-
"updated": obj.get("updated"),
|
100
|
-
"errorMessage": obj.get("errorMessage")
|
101
|
-
})
|
102
|
-
return _obj
|
103
|
-
|
104
|
-
|
File without changes
|
File without changes
|