terra-scientific-pipelines-service-api-client 0.1.28__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.

Potentially problematic release.


This version of terra-scientific-pipelines-service-api-client might be problematic. Click here for more details.

Files changed (44) hide show
  1. teaspoons_client/__init__.py +63 -0
  2. teaspoons_client/api/__init__.py +10 -0
  3. teaspoons_client/api/admin_api.py +1229 -0
  4. teaspoons_client/api/jobs_api.py +592 -0
  5. teaspoons_client/api/pipeline_runs_api.py +1166 -0
  6. teaspoons_client/api/pipelines_api.py +581 -0
  7. teaspoons_client/api/public_api.py +532 -0
  8. teaspoons_client/api/quotas_api.py +303 -0
  9. teaspoons_client/api_client.py +797 -0
  10. teaspoons_client/api_response.py +21 -0
  11. teaspoons_client/configuration.py +465 -0
  12. teaspoons_client/exceptions.py +199 -0
  13. teaspoons_client/models/__init__.py +41 -0
  14. teaspoons_client/models/admin_pipeline.py +103 -0
  15. teaspoons_client/models/admin_quota.py +93 -0
  16. teaspoons_client/models/async_pipeline_run_response.py +103 -0
  17. teaspoons_client/models/error_report.py +91 -0
  18. teaspoons_client/models/get_jobs_response.py +99 -0
  19. teaspoons_client/models/get_pipeline_details_request_body.py +87 -0
  20. teaspoons_client/models/get_pipeline_runs_response.py +97 -0
  21. teaspoons_client/models/get_pipelines_result.py +95 -0
  22. teaspoons_client/models/job_control.py +87 -0
  23. teaspoons_client/models/job_report.py +106 -0
  24. teaspoons_client/models/job_result.py +97 -0
  25. teaspoons_client/models/pipeline.py +93 -0
  26. teaspoons_client/models/pipeline_run.py +97 -0
  27. teaspoons_client/models/pipeline_run_report.py +93 -0
  28. teaspoons_client/models/pipeline_user_provided_input_definition.py +91 -0
  29. teaspoons_client/models/pipeline_with_details.py +105 -0
  30. teaspoons_client/models/prepare_pipeline_run_request_body.py +95 -0
  31. teaspoons_client/models/prepare_pipeline_run_response.py +89 -0
  32. teaspoons_client/models/quota_with_details.py +91 -0
  33. teaspoons_client/models/start_pipeline_run_request_body.py +91 -0
  34. teaspoons_client/models/system_status.py +102 -0
  35. teaspoons_client/models/system_status_systems_value.py +89 -0
  36. teaspoons_client/models/update_pipeline_request_body.py +91 -0
  37. teaspoons_client/models/update_quota_limit_request_body.py +87 -0
  38. teaspoons_client/models/version_properties.py +93 -0
  39. teaspoons_client/py.typed +0 -0
  40. teaspoons_client/rest.py +257 -0
  41. terra_scientific_pipelines_service_api_client-0.1.28.dist-info/METADATA +23 -0
  42. terra_scientific_pipelines_service_api_client-0.1.28.dist-info/RECORD +44 -0
  43. terra_scientific_pipelines_service_api_client-0.1.28.dist-info/WHEEL +5 -0
  44. terra_scientific_pipelines_service_api_client-0.1.28.dist-info/top_level.txt +1 -0
@@ -0,0 +1,97 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Terra Scientific Pipelines Service
5
+
6
+ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
7
+
8
+ The version of the OpenAPI document: 1.0.0
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+
15
+ from __future__ import annotations
16
+ import pprint
17
+ import re # noqa: F401
18
+ import json
19
+
20
+ from pydantic import BaseModel, ConfigDict, Field, StrictStr
21
+ from typing import Any, ClassVar, Dict, List, Optional
22
+ from teaspoons_client.models.pipeline_run import PipelineRun
23
+ from typing import Optional, Set
24
+ from typing_extensions import Self
25
+
26
+ class GetPipelineRunsResponse(BaseModel):
27
+ """
28
+ GetPipelineRunsResponse
29
+ """ # noqa: E501
30
+ page_token: Optional[StrictStr] = Field(default=None, alias="pageToken")
31
+ results: Optional[List[PipelineRun]] = Field(default=None, description="List of pipeline runs")
32
+ __properties: ClassVar[List[str]] = ["pageToken", "results"]
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 GetPipelineRunsResponse 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
+ # override the default output from pydantic by calling `to_dict()` of each item in results (list)
74
+ _items = []
75
+ if self.results:
76
+ for _item_results in self.results:
77
+ if _item_results:
78
+ _items.append(_item_results.to_dict())
79
+ _dict['results'] = _items
80
+ return _dict
81
+
82
+ @classmethod
83
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
84
+ """Create an instance of GetPipelineRunsResponse from a dict"""
85
+ if obj is None:
86
+ return None
87
+
88
+ if not isinstance(obj, dict):
89
+ return cls.model_validate(obj)
90
+
91
+ _obj = cls.model_validate({
92
+ "pageToken": obj.get("pageToken"),
93
+ "results": [PipelineRun.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None
94
+ })
95
+ return _obj
96
+
97
+
@@ -0,0 +1,95 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Terra Scientific Pipelines Service
5
+
6
+ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
7
+
8
+ The version of the OpenAPI document: 1.0.0
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+
15
+ from __future__ import annotations
16
+ import pprint
17
+ import re # noqa: F401
18
+ import json
19
+
20
+ from pydantic import BaseModel, ConfigDict, Field
21
+ from typing import Any, ClassVar, Dict, List, Optional
22
+ from teaspoons_client.models.pipeline import Pipeline
23
+ from typing import Optional, Set
24
+ from typing_extensions import Self
25
+
26
+ class GetPipelinesResult(BaseModel):
27
+ """
28
+ result of a getPipelines request
29
+ """ # noqa: E501
30
+ results: Optional[List[Pipeline]] = Field(default=None, description="List of retrieved pipelines")
31
+ __properties: ClassVar[List[str]] = ["results"]
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 GetPipelinesResult 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
+ # override the default output from pydantic by calling `to_dict()` of each item in results (list)
73
+ _items = []
74
+ if self.results:
75
+ for _item_results in self.results:
76
+ if _item_results:
77
+ _items.append(_item_results.to_dict())
78
+ _dict['results'] = _items
79
+ return _dict
80
+
81
+ @classmethod
82
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
83
+ """Create an instance of GetPipelinesResult from a dict"""
84
+ if obj is None:
85
+ return None
86
+
87
+ if not isinstance(obj, dict):
88
+ return cls.model_validate(obj)
89
+
90
+ _obj = cls.model_validate({
91
+ "results": [Pipeline.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None
92
+ })
93
+ return _obj
94
+
95
+
@@ -0,0 +1,87 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Terra Scientific Pipelines Service
5
+
6
+ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
7
+
8
+ The version of the OpenAPI document: 1.0.0
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+
15
+ from __future__ import annotations
16
+ import pprint
17
+ import re # noqa: F401
18
+ import json
19
+
20
+ from pydantic import BaseModel, ConfigDict, Field, StrictStr
21
+ from typing import Any, ClassVar, Dict, List
22
+ from typing import Optional, Set
23
+ from typing_extensions import Self
24
+
25
+ class JobControl(BaseModel):
26
+ """
27
+ JobControl
28
+ """ # noqa: E501
29
+ id: StrictStr = Field(description="Required unique identifier (UUID) for a job. ")
30
+ __properties: ClassVar[List[str]] = ["id"]
31
+
32
+ model_config = ConfigDict(
33
+ populate_by_name=True,
34
+ validate_assignment=True,
35
+ protected_namespaces=(),
36
+ )
37
+
38
+
39
+ def to_str(self) -> str:
40
+ """Returns the string representation of the model using alias"""
41
+ return pprint.pformat(self.model_dump(by_alias=True))
42
+
43
+ def to_json(self) -> str:
44
+ """Returns the JSON representation of the model using alias"""
45
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
46
+ return json.dumps(self.to_dict())
47
+
48
+ @classmethod
49
+ def from_json(cls, json_str: str) -> Optional[Self]:
50
+ """Create an instance of JobControl from a JSON string"""
51
+ return cls.from_dict(json.loads(json_str))
52
+
53
+ def to_dict(self) -> Dict[str, Any]:
54
+ """Return the dictionary representation of the model using alias.
55
+
56
+ This has the following differences from calling pydantic's
57
+ `self.model_dump(by_alias=True)`:
58
+
59
+ * `None` is only added to the output dict for nullable fields that
60
+ were set at model initialization. Other fields with value `None`
61
+ are ignored.
62
+ """
63
+ excluded_fields: Set[str] = set([
64
+ ])
65
+
66
+ _dict = self.model_dump(
67
+ by_alias=True,
68
+ exclude=excluded_fields,
69
+ exclude_none=True,
70
+ )
71
+ return _dict
72
+
73
+ @classmethod
74
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
75
+ """Create an instance of JobControl from a dict"""
76
+ if obj is None:
77
+ return None
78
+
79
+ if not isinstance(obj, dict):
80
+ return cls.model_validate(obj)
81
+
82
+ _obj = cls.model_validate({
83
+ "id": obj.get("id")
84
+ })
85
+ return _obj
86
+
87
+
@@ -0,0 +1,106 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Terra Scientific Pipelines Service
5
+
6
+ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
7
+
8
+ The version of the OpenAPI document: 1.0.0
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+
15
+ from __future__ import annotations
16
+ import pprint
17
+ import re # noqa: F401
18
+ import json
19
+
20
+ from pydantic import BaseModel, ConfigDict, Field, StrictInt, 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 JobReport(BaseModel):
26
+ """
27
+ JobReport
28
+ """ # noqa: E501
29
+ id: StrictStr = Field(description="caller-provided unique identifier for the job")
30
+ description: Optional[StrictStr] = Field(default=None, description="caller-provided description of the job")
31
+ status: StrictStr = Field(description="status of the job")
32
+ status_code: StrictInt = Field(description="HTTP code providing status of the job.", alias="statusCode")
33
+ submitted: Optional[StrictStr] = Field(default=None, description="timestamp when the job was submitted; in ISO-8601 format")
34
+ completed: Optional[StrictStr] = Field(default=None, description="timestamp when the job completed - in ISO-8601 format. Present if status is SUCCEEDED or FAILED.")
35
+ result_url: StrictStr = Field(description="URL where the result of the job can be retrieved. Equivalent to a Location header in HTTP.", alias="resultURL")
36
+ __properties: ClassVar[List[str]] = ["id", "description", "status", "statusCode", "submitted", "completed", "resultURL"]
37
+
38
+ @field_validator('status')
39
+ def status_validate_enum(cls, value):
40
+ """Validates the enum"""
41
+ if value not in set(['RUNNING', 'SUCCEEDED', 'FAILED']):
42
+ raise ValueError("must be one of enum values ('RUNNING', 'SUCCEEDED', 'FAILED')")
43
+ return value
44
+
45
+ model_config = ConfigDict(
46
+ populate_by_name=True,
47
+ validate_assignment=True,
48
+ protected_namespaces=(),
49
+ )
50
+
51
+
52
+ def to_str(self) -> str:
53
+ """Returns the string representation of the model using alias"""
54
+ return pprint.pformat(self.model_dump(by_alias=True))
55
+
56
+ def to_json(self) -> str:
57
+ """Returns the JSON representation of the model using alias"""
58
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
59
+ return json.dumps(self.to_dict())
60
+
61
+ @classmethod
62
+ def from_json(cls, json_str: str) -> Optional[Self]:
63
+ """Create an instance of JobReport from a JSON string"""
64
+ return cls.from_dict(json.loads(json_str))
65
+
66
+ def to_dict(self) -> Dict[str, Any]:
67
+ """Return the dictionary representation of the model using alias.
68
+
69
+ This has the following differences from calling pydantic's
70
+ `self.model_dump(by_alias=True)`:
71
+
72
+ * `None` is only added to the output dict for nullable fields that
73
+ were set at model initialization. Other fields with value `None`
74
+ are ignored.
75
+ """
76
+ excluded_fields: Set[str] = set([
77
+ ])
78
+
79
+ _dict = self.model_dump(
80
+ by_alias=True,
81
+ exclude=excluded_fields,
82
+ exclude_none=True,
83
+ )
84
+ return _dict
85
+
86
+ @classmethod
87
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
88
+ """Create an instance of JobReport from a dict"""
89
+ if obj is None:
90
+ return None
91
+
92
+ if not isinstance(obj, dict):
93
+ return cls.model_validate(obj)
94
+
95
+ _obj = cls.model_validate({
96
+ "id": obj.get("id"),
97
+ "description": obj.get("description"),
98
+ "status": obj.get("status"),
99
+ "statusCode": obj.get("statusCode"),
100
+ "submitted": obj.get("submitted"),
101
+ "completed": obj.get("completed"),
102
+ "resultURL": obj.get("resultURL")
103
+ })
104
+ return _obj
105
+
106
+
@@ -0,0 +1,97 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Terra Scientific Pipelines Service
5
+
6
+ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
7
+
8
+ The version of the OpenAPI document: 1.0.0
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+
15
+ from __future__ import annotations
16
+ import pprint
17
+ import re # noqa: F401
18
+ import json
19
+
20
+ from pydantic import BaseModel, ConfigDict, Field
21
+ from typing import Any, ClassVar, Dict, List, Optional
22
+ from teaspoons_client.models.error_report import ErrorReport
23
+ from teaspoons_client.models.job_report import JobReport
24
+ from typing import Optional, Set
25
+ from typing_extensions import Self
26
+
27
+ class JobResult(BaseModel):
28
+ """
29
+ The result of a call that triggers an asynchronous job.
30
+ """ # noqa: E501
31
+ job_report: JobReport = Field(alias="jobReport")
32
+ error_report: Optional[ErrorReport] = Field(default=None, alias="errorReport")
33
+ __properties: ClassVar[List[str]] = ["jobReport", "errorReport"]
34
+
35
+ model_config = ConfigDict(
36
+ populate_by_name=True,
37
+ validate_assignment=True,
38
+ protected_namespaces=(),
39
+ )
40
+
41
+
42
+ def to_str(self) -> str:
43
+ """Returns the string representation of the model using alias"""
44
+ return pprint.pformat(self.model_dump(by_alias=True))
45
+
46
+ def to_json(self) -> str:
47
+ """Returns the JSON representation of the model using alias"""
48
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
49
+ return json.dumps(self.to_dict())
50
+
51
+ @classmethod
52
+ def from_json(cls, json_str: str) -> Optional[Self]:
53
+ """Create an instance of JobResult from a JSON string"""
54
+ return cls.from_dict(json.loads(json_str))
55
+
56
+ def to_dict(self) -> Dict[str, Any]:
57
+ """Return the dictionary representation of the model using alias.
58
+
59
+ This has the following differences from calling pydantic's
60
+ `self.model_dump(by_alias=True)`:
61
+
62
+ * `None` is only added to the output dict for nullable fields that
63
+ were set at model initialization. Other fields with value `None`
64
+ are ignored.
65
+ """
66
+ excluded_fields: Set[str] = set([
67
+ ])
68
+
69
+ _dict = self.model_dump(
70
+ by_alias=True,
71
+ exclude=excluded_fields,
72
+ exclude_none=True,
73
+ )
74
+ # override the default output from pydantic by calling `to_dict()` of job_report
75
+ if self.job_report:
76
+ _dict['jobReport'] = self.job_report.to_dict()
77
+ # override the default output from pydantic by calling `to_dict()` of error_report
78
+ if self.error_report:
79
+ _dict['errorReport'] = self.error_report.to_dict()
80
+ return _dict
81
+
82
+ @classmethod
83
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
84
+ """Create an instance of JobResult from a dict"""
85
+ if obj is None:
86
+ return None
87
+
88
+ if not isinstance(obj, dict):
89
+ return cls.model_validate(obj)
90
+
91
+ _obj = cls.model_validate({
92
+ "jobReport": JobReport.from_dict(obj["jobReport"]) if obj.get("jobReport") is not None else None,
93
+ "errorReport": ErrorReport.from_dict(obj["errorReport"]) if obj.get("errorReport") is not None else None
94
+ })
95
+ return _obj
96
+
97
+
@@ -0,0 +1,93 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Terra Scientific Pipelines Service
5
+
6
+ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
7
+
8
+ The version of the OpenAPI document: 1.0.0
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+
15
+ from __future__ import annotations
16
+ import pprint
17
+ import re # noqa: F401
18
+ import json
19
+
20
+ from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
21
+ from typing import Any, ClassVar, Dict, List
22
+ from typing import Optional, Set
23
+ from typing_extensions import Self
24
+
25
+ class Pipeline(BaseModel):
26
+ """
27
+ Object containing the pipeline identifier, display name, and description of a Pipeline.
28
+ """ # noqa: E501
29
+ pipeline_name: StrictStr = Field(description="The identifier string for the Pipeline. ", alias="pipelineName")
30
+ display_name: StrictStr = Field(description="The display name for the Pipeline. ", alias="displayName")
31
+ pipeline_version: StrictInt = Field(description="An identifier Integer for the Pipeline Version. ", alias="pipelineVersion")
32
+ description: StrictStr = Field(description="The description for the Pipeline. ")
33
+ __properties: ClassVar[List[str]] = ["pipelineName", "displayName", "pipelineVersion", "description"]
34
+
35
+ model_config = ConfigDict(
36
+ populate_by_name=True,
37
+ validate_assignment=True,
38
+ protected_namespaces=(),
39
+ )
40
+
41
+
42
+ def to_str(self) -> str:
43
+ """Returns the string representation of the model using alias"""
44
+ return pprint.pformat(self.model_dump(by_alias=True))
45
+
46
+ def to_json(self) -> str:
47
+ """Returns the JSON representation of the model using alias"""
48
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
49
+ return json.dumps(self.to_dict())
50
+
51
+ @classmethod
52
+ def from_json(cls, json_str: str) -> Optional[Self]:
53
+ """Create an instance of Pipeline from a JSON string"""
54
+ return cls.from_dict(json.loads(json_str))
55
+
56
+ def to_dict(self) -> Dict[str, Any]:
57
+ """Return the dictionary representation of the model using alias.
58
+
59
+ This has the following differences from calling pydantic's
60
+ `self.model_dump(by_alias=True)`:
61
+
62
+ * `None` is only added to the output dict for nullable fields that
63
+ were set at model initialization. Other fields with value `None`
64
+ are ignored.
65
+ """
66
+ excluded_fields: Set[str] = set([
67
+ ])
68
+
69
+ _dict = self.model_dump(
70
+ by_alias=True,
71
+ exclude=excluded_fields,
72
+ exclude_none=True,
73
+ )
74
+ return _dict
75
+
76
+ @classmethod
77
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
78
+ """Create an instance of Pipeline from a dict"""
79
+ if obj is None:
80
+ return None
81
+
82
+ if not isinstance(obj, dict):
83
+ return cls.model_validate(obj)
84
+
85
+ _obj = cls.model_validate({
86
+ "pipelineName": obj.get("pipelineName"),
87
+ "displayName": obj.get("displayName"),
88
+ "pipelineVersion": obj.get("pipelineVersion"),
89
+ "description": obj.get("description")
90
+ })
91
+ return _obj
92
+
93
+
@@ -0,0 +1,97 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Terra Scientific Pipelines Service
5
+
6
+ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
7
+
8
+ The version of the OpenAPI document: 1.0.0
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+
15
+ from __future__ import annotations
16
+ import pprint
17
+ import re # noqa: F401
18
+ import json
19
+
20
+ from pydantic import BaseModel, ConfigDict, 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 PipelineRun(BaseModel):
26
+ """
27
+ Object containing the job id, status, user-provided description, time submitted, and (if run is complete) time completed of a Pipeline Run.
28
+ """ # noqa: E501
29
+ job_id: StrictStr = Field(description="Required unique identifier (UUID) for a job. ", alias="jobId")
30
+ pipeline_name: StrictStr = Field(description="The identifier string for the Pipeline. ", alias="pipelineName")
31
+ status: StrictStr = Field(description="The current status of the pipeline run. ")
32
+ description: Optional[StrictStr] = Field(default=None, description="The user-provided description for the pipeline run. ")
33
+ time_submitted: StrictStr = Field(description="The time the job was submitted. ", alias="timeSubmitted")
34
+ time_completed: Optional[StrictStr] = Field(default=None, description="The time the job was completed. ", alias="timeCompleted")
35
+ __properties: ClassVar[List[str]] = ["jobId", "pipelineName", "status", "description", "timeSubmitted", "timeCompleted"]
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 PipelineRun 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.
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
+ return _dict
77
+
78
+ @classmethod
79
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
80
+ """Create an instance of PipelineRun from a dict"""
81
+ if obj is None:
82
+ return None
83
+
84
+ if not isinstance(obj, dict):
85
+ return cls.model_validate(obj)
86
+
87
+ _obj = cls.model_validate({
88
+ "jobId": obj.get("jobId"),
89
+ "pipelineName": obj.get("pipelineName"),
90
+ "status": obj.get("status"),
91
+ "description": obj.get("description"),
92
+ "timeSubmitted": obj.get("timeSubmitted"),
93
+ "timeCompleted": obj.get("timeCompleted")
94
+ })
95
+ return _obj
96
+
97
+