wds-client 0.7.0__py3-none-any.whl → 0.9.0__py3-none-any.whl

Sign up to get free protection for your applications and to get access to all the features.
Files changed (58) hide show
  1. wds_client/__init__.py +8 -10
  2. wds_client/api/__init__.py +1 -2
  3. wds_client/api/capabilities_api.py +237 -102
  4. wds_client/api/cloning_api.py +782 -329
  5. wds_client/api/general_wds_information_api.py +463 -191
  6. wds_client/api/import_api.py +288 -127
  7. wds_client/api/instances_api.py +783 -333
  8. wds_client/api/job_api.py +518 -215
  9. wds_client/api/records_api.py +2512 -1089
  10. wds_client/api/schema_api.py +1450 -626
  11. wds_client/api_client.py +414 -310
  12. wds_client/api_response.py +21 -0
  13. wds_client/configuration.py +110 -53
  14. wds_client/exceptions.py +99 -20
  15. wds_client/models/__init__.py +4 -8
  16. wds_client/models/app.py +68 -125
  17. wds_client/models/attribute_data_type.py +31 -94
  18. wds_client/models/attribute_schema.py +71 -157
  19. wds_client/models/attribute_schema_update.py +69 -127
  20. wds_client/models/backup_job.py +96 -298
  21. wds_client/models/backup_response.py +70 -157
  22. wds_client/models/backup_restore_request.py +68 -129
  23. wds_client/models/batch_operation.py +83 -137
  24. wds_client/models/batch_record_request.py +70 -160
  25. wds_client/models/batch_response.py +68 -127
  26. wds_client/models/build.py +79 -207
  27. wds_client/models/capabilities.py +83 -103
  28. wds_client/models/clone_job.py +96 -298
  29. wds_client/models/clone_response.py +68 -129
  30. wds_client/models/commit.py +69 -125
  31. wds_client/models/error_response.py +78 -222
  32. wds_client/models/generic_job.py +102 -334
  33. wds_client/models/git.py +76 -129
  34. wds_client/models/import_request.py +77 -165
  35. wds_client/models/job.py +87 -243
  36. wds_client/models/job_v1.py +97 -277
  37. wds_client/models/record_query_response.py +86 -162
  38. wds_client/models/record_request.py +60 -96
  39. wds_client/models/record_response.py +70 -160
  40. wds_client/models/record_type_schema.py +84 -191
  41. wds_client/models/search_filter.py +60 -95
  42. wds_client/models/search_request.py +84 -220
  43. wds_client/models/search_sort_direction.py +17 -80
  44. wds_client/models/status_response.py +68 -125
  45. wds_client/models/tsv_upload_response.py +68 -127
  46. wds_client/models/version_response.py +86 -155
  47. wds_client/py.typed +0 -0
  48. wds_client/rest.py +136 -170
  49. wds_client-0.9.0.dist-info/METADATA +17 -0
  50. wds_client-0.9.0.dist-info/RECORD +52 -0
  51. {wds_client-0.7.0.dist-info → wds_client-0.9.0.dist-info}/WHEEL +1 -1
  52. wds_client/models/backup_job_all_of.py +0 -148
  53. wds_client/models/clone_job_all_of.py +0 -148
  54. wds_client/models/generic_job_all_of.py +0 -150
  55. wds_client/models/inline_object.py +0 -123
  56. wds_client-0.7.0.dist-info/METADATA +0 -16
  57. wds_client-0.7.0.dist-info/RECORD +0 -54
  58. {wds_client-0.7.0.dist-info → wds_client-0.9.0.dist-info}/top_level.txt +0 -0
@@ -3,146 +3,87 @@
3
3
  """
4
4
  Workspace Data Service
5
5
 
6
- This page lists current APIs. As of v0.2, all APIs are subject to change without notice. # noqa: E501
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
7
 
8
8
  The version of the OpenAPI document: v0.2
9
- Generated by: https://openapi-generator.tech
10
- """
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
11
13
 
12
14
 
15
+ from __future__ import annotations
13
16
  import pprint
14
17
  import re # noqa: F401
18
+ import json
15
19
 
16
- import six
17
-
18
- from wds_client.configuration import Configuration
19
-
20
-
21
- class TsvUploadResponse(object):
22
- """NOTE: This class is auto generated by OpenAPI Generator.
23
- Ref: https://openapi-generator.tech
24
-
25
- Do not edit the class manually.
26
- """
20
+ from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
21
+ from typing import Any, ClassVar, Dict, List
22
+ from typing import Optional, Set
23
+ from typing_extensions import Self
27
24
 
25
+ class TsvUploadResponse(BaseModel):
28
26
  """
29
- Attributes:
30
- openapi_types (dict): The key is attribute name
31
- and the value is attribute type.
32
- attribute_map (dict): The key is attribute name
33
- and the value is json key in definition.
34
- """
35
- openapi_types = {
36
- 'message': 'str',
37
- 'records_modified': 'int'
38
- }
39
-
40
- attribute_map = {
41
- 'message': 'message',
42
- 'records_modified': 'recordsModified'
43
- }
44
-
45
- def __init__(self, message=None, records_modified=None, local_vars_configuration=None): # noqa: E501
46
- """TsvUploadResponse - a model defined in OpenAPI""" # noqa: E501
47
- if local_vars_configuration is None:
48
- local_vars_configuration = Configuration()
49
- self.local_vars_configuration = local_vars_configuration
50
-
51
- self._message = None
52
- self._records_modified = None
53
- self.discriminator = None
54
-
55
- self.message = message
56
- self.records_modified = records_modified
57
-
58
- @property
59
- def message(self):
60
- """Gets the message of this TsvUploadResponse. # noqa: E501
61
-
62
-
63
- :return: The message of this TsvUploadResponse. # noqa: E501
64
- :rtype: str
65
- """
66
- return self._message
67
-
68
- @message.setter
69
- def message(self, message):
70
- """Sets the message of this TsvUploadResponse.
71
-
72
-
73
- :param message: The message of this TsvUploadResponse. # noqa: E501
74
- :type: str
27
+ TsvUploadResponse
28
+ """ # noqa: E501
29
+ message: StrictStr
30
+ records_modified: StrictInt = Field(alias="recordsModified")
31
+ __properties: ClassVar[List[str]] = ["message", "recordsModified"]
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 TsvUploadResponse 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.
75
63
  """
76
- if self.local_vars_configuration.client_side_validation and message is None: # noqa: E501
77
- raise ValueError("Invalid value for `message`, must not be `None`") # noqa: E501
64
+ excluded_fields: Set[str] = set([
65
+ ])
78
66
 
79
- self._message = message
67
+ _dict = self.model_dump(
68
+ by_alias=True,
69
+ exclude=excluded_fields,
70
+ exclude_none=True,
71
+ )
72
+ return _dict
80
73
 
81
- @property
82
- def records_modified(self):
83
- """Gets the records_modified of this TsvUploadResponse. # noqa: E501
74
+ @classmethod
75
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
76
+ """Create an instance of TsvUploadResponse from a dict"""
77
+ if obj is None:
78
+ return None
84
79
 
80
+ if not isinstance(obj, dict):
81
+ return cls.model_validate(obj)
85
82
 
86
- :return: The records_modified of this TsvUploadResponse. # noqa: E501
87
- :rtype: int
88
- """
89
- return self._records_modified
90
-
91
- @records_modified.setter
92
- def records_modified(self, records_modified):
93
- """Sets the records_modified of this TsvUploadResponse.
83
+ _obj = cls.model_validate({
84
+ "message": obj.get("message"),
85
+ "recordsModified": obj.get("recordsModified")
86
+ })
87
+ return _obj
94
88
 
95
89
 
96
- :param records_modified: The records_modified of this TsvUploadResponse. # noqa: E501
97
- :type: int
98
- """
99
- if self.local_vars_configuration.client_side_validation and records_modified is None: # noqa: E501
100
- raise ValueError("Invalid value for `records_modified`, must not be `None`") # noqa: E501
101
-
102
- self._records_modified = records_modified
103
-
104
- def to_dict(self):
105
- """Returns the model properties as a dict"""
106
- result = {}
107
-
108
- for attr, _ in six.iteritems(self.openapi_types):
109
- value = getattr(self, attr)
110
- if isinstance(value, list):
111
- result[attr] = list(map(
112
- lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
113
- value
114
- ))
115
- elif hasattr(value, "to_dict"):
116
- result[attr] = value.to_dict()
117
- elif isinstance(value, dict):
118
- result[attr] = dict(map(
119
- lambda item: (item[0], item[1].to_dict())
120
- if hasattr(item[1], "to_dict") else item,
121
- value.items()
122
- ))
123
- else:
124
- result[attr] = value
125
-
126
- return result
127
-
128
- def to_str(self):
129
- """Returns the string representation of the model"""
130
- return pprint.pformat(self.to_dict())
131
-
132
- def __repr__(self):
133
- """For `print` and `pprint`"""
134
- return self.to_str()
135
-
136
- def __eq__(self, other):
137
- """Returns true if both objects are equal"""
138
- if not isinstance(other, TsvUploadResponse):
139
- return False
140
-
141
- return self.to_dict() == other.to_dict()
142
-
143
- def __ne__(self, other):
144
- """Returns true if both objects are not equal"""
145
- if not isinstance(other, TsvUploadResponse):
146
- return True
147
-
148
- return self.to_dict() != other.to_dict()
@@ -3,170 +3,101 @@
3
3
  """
4
4
  Workspace Data Service
5
5
 
6
- This page lists current APIs. As of v0.2, all APIs are subject to change without notice. # noqa: E501
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
7
 
8
8
  The version of the OpenAPI document: v0.2
9
- Generated by: https://openapi-generator.tech
10
- """
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
11
13
 
12
14
 
15
+ from __future__ import annotations
13
16
  import pprint
14
17
  import re # noqa: F401
18
+ import json
15
19
 
16
- import six
17
-
18
- from wds_client.configuration import Configuration
19
-
20
-
21
- class VersionResponse(object):
22
- """NOTE: This class is auto generated by OpenAPI Generator.
23
- Ref: https://openapi-generator.tech
24
-
25
- Do not edit the class manually.
26
- """
20
+ from pydantic import BaseModel, ConfigDict
21
+ from typing import Any, ClassVar, Dict, List, Optional
22
+ from wds_client.models.app import App
23
+ from wds_client.models.build import Build
24
+ from wds_client.models.git import Git
25
+ from typing import Optional, Set
26
+ from typing_extensions import Self
27
27
 
28
+ class VersionResponse(BaseModel):
28
29
  """
29
- Attributes:
30
- openapi_types (dict): The key is attribute name
31
- and the value is attribute type.
32
- attribute_map (dict): The key is attribute name
33
- and the value is json key in definition.
34
- """
35
- openapi_types = {
36
- 'app': 'App',
37
- 'git': 'Git',
38
- 'build': 'Build'
39
- }
40
-
41
- attribute_map = {
42
- 'app': 'app',
43
- 'git': 'git',
44
- 'build': 'build'
45
- }
46
-
47
- def __init__(self, app=None, git=None, build=None, local_vars_configuration=None): # noqa: E501
48
- """VersionResponse - a model defined in OpenAPI""" # noqa: E501
49
- if local_vars_configuration is None:
50
- local_vars_configuration = Configuration()
51
- self.local_vars_configuration = local_vars_configuration
52
-
53
- self._app = None
54
- self._git = None
55
- self._build = None
56
- self.discriminator = None
57
-
58
- if app is not None:
59
- self.app = app
60
- if git is not None:
61
- self.git = git
62
- if build is not None:
63
- self.build = build
64
-
65
- @property
66
- def app(self):
67
- """Gets the app of this VersionResponse. # noqa: E501
68
-
69
-
70
- :return: The app of this VersionResponse. # noqa: E501
71
- :rtype: App
72
- """
73
- return self._app
74
-
75
- @app.setter
76
- def app(self, app):
77
- """Sets the app of this VersionResponse.
78
-
79
-
80
- :param app: The app of this VersionResponse. # noqa: E501
81
- :type: App
30
+ VersionResponse
31
+ """ # noqa: E501
32
+ app: Optional[App] = None
33
+ git: Optional[Git] = None
34
+ build: Optional[Build] = None
35
+ __properties: ClassVar[List[str]] = ["app", "git", "build"]
36
+
37
+ model_config = ConfigDict(
38
+ populate_by_name=True,
39
+ validate_assignment=True,
40
+ protected_namespaces=(),
41
+ )
42
+
43
+
44
+ def to_str(self) -> str:
45
+ """Returns the string representation of the model using alias"""
46
+ return pprint.pformat(self.model_dump(by_alias=True))
47
+
48
+ def to_json(self) -> str:
49
+ """Returns the JSON representation of the model using alias"""
50
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
51
+ return json.dumps(self.to_dict())
52
+
53
+ @classmethod
54
+ def from_json(cls, json_str: str) -> Optional[Self]:
55
+ """Create an instance of VersionResponse from a JSON string"""
56
+ return cls.from_dict(json.loads(json_str))
57
+
58
+ def to_dict(self) -> Dict[str, Any]:
59
+ """Return the dictionary representation of the model using alias.
60
+
61
+ This has the following differences from calling pydantic's
62
+ `self.model_dump(by_alias=True)`:
63
+
64
+ * `None` is only added to the output dict for nullable fields that
65
+ were set at model initialization. Other fields with value `None`
66
+ are ignored.
82
67
  """
68
+ excluded_fields: Set[str] = set([
69
+ ])
70
+
71
+ _dict = self.model_dump(
72
+ by_alias=True,
73
+ exclude=excluded_fields,
74
+ exclude_none=True,
75
+ )
76
+ # override the default output from pydantic by calling `to_dict()` of app
77
+ if self.app:
78
+ _dict['app'] = self.app.to_dict()
79
+ # override the default output from pydantic by calling `to_dict()` of git
80
+ if self.git:
81
+ _dict['git'] = self.git.to_dict()
82
+ # override the default output from pydantic by calling `to_dict()` of build
83
+ if self.build:
84
+ _dict['build'] = self.build.to_dict()
85
+ return _dict
86
+
87
+ @classmethod
88
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
89
+ """Create an instance of VersionResponse from a dict"""
90
+ if obj is None:
91
+ return None
92
+
93
+ if not isinstance(obj, dict):
94
+ return cls.model_validate(obj)
95
+
96
+ _obj = cls.model_validate({
97
+ "app": App.from_dict(obj["app"]) if obj.get("app") is not None else None,
98
+ "git": Git.from_dict(obj["git"]) if obj.get("git") is not None else None,
99
+ "build": Build.from_dict(obj["build"]) if obj.get("build") is not None else None
100
+ })
101
+ return _obj
83
102
 
84
- self._app = app
85
-
86
- @property
87
- def git(self):
88
- """Gets the git of this VersionResponse. # noqa: E501
89
-
90
-
91
- :return: The git of this VersionResponse. # noqa: E501
92
- :rtype: Git
93
- """
94
- return self._git
95
-
96
- @git.setter
97
- def git(self, git):
98
- """Sets the git of this VersionResponse.
99
-
100
-
101
- :param git: The git of this VersionResponse. # noqa: E501
102
- :type: Git
103
- """
104
-
105
- self._git = git
106
-
107
- @property
108
- def build(self):
109
- """Gets the build of this VersionResponse. # noqa: E501
110
-
111
-
112
- :return: The build of this VersionResponse. # noqa: E501
113
- :rtype: Build
114
- """
115
- return self._build
116
-
117
- @build.setter
118
- def build(self, build):
119
- """Sets the build of this VersionResponse.
120
-
121
-
122
- :param build: The build of this VersionResponse. # noqa: E501
123
- :type: Build
124
- """
125
103
 
126
- self._build = build
127
-
128
- def to_dict(self):
129
- """Returns the model properties as a dict"""
130
- result = {}
131
-
132
- for attr, _ in six.iteritems(self.openapi_types):
133
- value = getattr(self, attr)
134
- if isinstance(value, list):
135
- result[attr] = list(map(
136
- lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
137
- value
138
- ))
139
- elif hasattr(value, "to_dict"):
140
- result[attr] = value.to_dict()
141
- elif isinstance(value, dict):
142
- result[attr] = dict(map(
143
- lambda item: (item[0], item[1].to_dict())
144
- if hasattr(item[1], "to_dict") else item,
145
- value.items()
146
- ))
147
- else:
148
- result[attr] = value
149
-
150
- return result
151
-
152
- def to_str(self):
153
- """Returns the string representation of the model"""
154
- return pprint.pformat(self.to_dict())
155
-
156
- def __repr__(self):
157
- """For `print` and `pprint`"""
158
- return self.to_str()
159
-
160
- def __eq__(self, other):
161
- """Returns true if both objects are equal"""
162
- if not isinstance(other, VersionResponse):
163
- return False
164
-
165
- return self.to_dict() == other.to_dict()
166
-
167
- def __ne__(self, other):
168
- """Returns true if both objects are not equal"""
169
- if not isinstance(other, VersionResponse):
170
- return True
171
-
172
- return self.to_dict() != other.to_dict()
wds_client/py.typed ADDED
File without changes