wds-client 0.6.0__py3-none-any.whl → 0.8.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.8.0.dist-info/METADATA +17 -0
  50. wds_client-0.8.0.dist-info/RECORD +52 -0
  51. wds_client/models/backup_job_all_of.py +0 -148
  52. wds_client/models/clone_job_all_of.py +0 -148
  53. wds_client/models/generic_job_all_of.py +0 -150
  54. wds_client/models/inline_object.py +0 -123
  55. wds_client-0.6.0.dist-info/METADATA +0 -16
  56. wds_client-0.6.0.dist-info/RECORD +0 -54
  57. {wds_client-0.6.0.dist-info → wds_client-0.8.0.dist-info}/WHEEL +0 -0
  58. {wds_client-0.6.0.dist-info → wds_client-0.8.0.dist-info}/top_level.txt +0 -0
@@ -3,148 +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 CloneResponse(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, StrictStr
21
+ from typing import Any, ClassVar, Dict, List, Optional
22
+ from typing import Optional, Set
23
+ from typing_extensions import Self
27
24
 
25
+ class CloneResponse(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
- 'sourceworkspaceid': 'str',
37
- 'clonestatus': 'str'
38
- }
39
-
40
- attribute_map = {
41
- 'sourceworkspaceid': 'sourceworkspaceid',
42
- 'clonestatus': 'clonestatus'
43
- }
44
-
45
- def __init__(self, sourceworkspaceid=None, clonestatus=None, local_vars_configuration=None): # noqa: E501
46
- """CloneResponse - 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._sourceworkspaceid = None
52
- self._clonestatus = None
53
- self.discriminator = None
54
-
55
- if sourceworkspaceid is not None:
56
- self.sourceworkspaceid = sourceworkspaceid
57
- if clonestatus is not None:
58
- self.clonestatus = clonestatus
59
-
60
- @property
61
- def sourceworkspaceid(self):
62
- """Gets the sourceworkspaceid of this CloneResponse. # noqa: E501
63
-
64
- workspace which initiated the clone # noqa: E501
65
-
66
- :return: The sourceworkspaceid of this CloneResponse. # noqa: E501
67
- :rtype: str
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.
68
63
  """
69
- return self._sourceworkspaceid
70
-
71
- @sourceworkspaceid.setter
72
- def sourceworkspaceid(self, sourceworkspaceid):
73
- """Sets the sourceworkspaceid of this CloneResponse.
64
+ excluded_fields: Set[str] = set([
65
+ ])
74
66
 
75
- workspace which initiated the clone # noqa: E501
67
+ _dict = self.model_dump(
68
+ by_alias=True,
69
+ exclude=excluded_fields,
70
+ exclude_none=True,
71
+ )
72
+ return _dict
76
73
 
77
- :param sourceworkspaceid: The sourceworkspaceid of this CloneResponse. # noqa: E501
78
- :type: str
79
- """
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
80
79
 
81
- self._sourceworkspaceid = sourceworkspaceid
80
+ if not isinstance(obj, dict):
81
+ return cls.model_validate(obj)
82
82
 
83
- @property
84
- def clonestatus(self):
85
- """Gets the clonestatus of this CloneResponse. # noqa: E501
83
+ _obj = cls.model_validate({
84
+ "sourceworkspaceid": obj.get("sourceworkspaceid"),
85
+ "clonestatus": obj.get("clonestatus")
86
+ })
87
+ return _obj
86
88
 
87
- description of this clone status # noqa: E501
88
-
89
- :return: The clonestatus of this CloneResponse. # noqa: E501
90
- :rtype: str
91
- """
92
- return self._clonestatus
93
-
94
- @clonestatus.setter
95
- def clonestatus(self, clonestatus):
96
- """Sets the clonestatus of this CloneResponse.
97
-
98
- description of this clone status # noqa: E501
99
-
100
- :param clonestatus: The clonestatus of this CloneResponse. # noqa: E501
101
- :type: str
102
- """
103
89
 
104
- self._clonestatus = clonestatus
105
-
106
- def to_dict(self):
107
- """Returns the model properties as a dict"""
108
- result = {}
109
-
110
- for attr, _ in six.iteritems(self.openapi_types):
111
- value = getattr(self, attr)
112
- if isinstance(value, list):
113
- result[attr] = list(map(
114
- lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
115
- value
116
- ))
117
- elif hasattr(value, "to_dict"):
118
- result[attr] = value.to_dict()
119
- elif isinstance(value, dict):
120
- result[attr] = dict(map(
121
- lambda item: (item[0], item[1].to_dict())
122
- if hasattr(item[1], "to_dict") else item,
123
- value.items()
124
- ))
125
- else:
126
- result[attr] = value
127
-
128
- return result
129
-
130
- def to_str(self):
131
- """Returns the string representation of the model"""
132
- return pprint.pformat(self.to_dict())
133
-
134
- def __repr__(self):
135
- """For `print` and `pprint`"""
136
- return self.to_str()
137
-
138
- def __eq__(self, other):
139
- """Returns true if both objects are equal"""
140
- if not isinstance(other, CloneResponse):
141
- return False
142
-
143
- return self.to_dict() == other.to_dict()
144
-
145
- def __ne__(self, other):
146
- """Returns true if both objects are not equal"""
147
- if not isinstance(other, CloneResponse):
148
- return True
149
-
150
- return self.to_dict() != other.to_dict()
@@ -3,144 +3,88 @@
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 Commit(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 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
27
25
 
26
+ class Commit(BaseModel):
28
27
  """
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
- 'id': 'str',
37
- 'time': 'datetime'
38
- }
39
-
40
- attribute_map = {
41
- 'id': 'id',
42
- 'time': 'time'
43
- }
44
-
45
- def __init__(self, id=None, time=None, local_vars_configuration=None): # noqa: E501
46
- """Commit - 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._id = None
52
- self._time = None
53
- self.discriminator = None
54
-
55
- if id is not None:
56
- self.id = id
57
- if time is not None:
58
- self.time = time
59
-
60
- @property
61
- def id(self):
62
- """Gets the id of this Commit. # noqa: E501
63
-
64
-
65
- :return: The id of this Commit. # noqa: E501
66
- :rtype: str
28
+ Commit
29
+ """ # noqa: E501
30
+ id: Optional[StrictStr] = None
31
+ time: Optional[datetime] = None
32
+ __properties: ClassVar[List[str]] = ["id", "time"]
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 Commit 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.
67
64
  """
68
- return self._id
69
-
70
- @id.setter
71
- def id(self, id):
72
- """Sets the id of this Commit.
65
+ excluded_fields: Set[str] = set([
66
+ ])
73
67
 
68
+ _dict = self.model_dump(
69
+ by_alias=True,
70
+ exclude=excluded_fields,
71
+ exclude_none=True,
72
+ )
73
+ return _dict
74
74
 
75
- :param id: The id of this Commit. # noqa: E501
76
- :type: str
77
- """
75
+ @classmethod
76
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
77
+ """Create an instance of Commit from a dict"""
78
+ if obj is None:
79
+ return None
78
80
 
79
- self._id = id
81
+ if not isinstance(obj, dict):
82
+ return cls.model_validate(obj)
80
83
 
81
- @property
82
- def time(self):
83
- """Gets the time of this Commit. # noqa: E501
84
+ _obj = cls.model_validate({
85
+ "id": obj.get("id"),
86
+ "time": obj.get("time")
87
+ })
88
+ return _obj
84
89
 
85
90
 
86
- :return: The time of this Commit. # noqa: E501
87
- :rtype: datetime
88
- """
89
- return self._time
90
-
91
- @time.setter
92
- def time(self, time):
93
- """Sets the time of this Commit.
94
-
95
-
96
- :param time: The time of this Commit. # noqa: E501
97
- :type: datetime
98
- """
99
-
100
- self._time = time
101
-
102
- def to_dict(self):
103
- """Returns the model properties as a dict"""
104
- result = {}
105
-
106
- for attr, _ in six.iteritems(self.openapi_types):
107
- value = getattr(self, attr)
108
- if isinstance(value, list):
109
- result[attr] = list(map(
110
- lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
111
- value
112
- ))
113
- elif hasattr(value, "to_dict"):
114
- result[attr] = value.to_dict()
115
- elif isinstance(value, dict):
116
- result[attr] = dict(map(
117
- lambda item: (item[0], item[1].to_dict())
118
- if hasattr(item[1], "to_dict") else item,
119
- value.items()
120
- ))
121
- else:
122
- result[attr] = value
123
-
124
- return result
125
-
126
- def to_str(self):
127
- """Returns the string representation of the model"""
128
- return pprint.pformat(self.to_dict())
129
-
130
- def __repr__(self):
131
- """For `print` and `pprint`"""
132
- return self.to_str()
133
-
134
- def __eq__(self, other):
135
- """Returns true if both objects are equal"""
136
- if not isinstance(other, Commit):
137
- return False
138
-
139
- return self.to_dict() == other.to_dict()
140
-
141
- def __ne__(self, other):
142
- """Returns true if both objects are not equal"""
143
- if not isinstance(other, Commit):
144
- return True
145
-
146
- return self.to_dict() != other.to_dict()