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,41 @@
1
+ # coding: utf-8
2
+
3
+ # flake8: noqa
4
+ """
5
+ Terra Scientific Pipelines Service
6
+
7
+ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
8
+
9
+ The version of the OpenAPI document: 1.0.0
10
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
11
+
12
+ Do not edit the class manually.
13
+ """ # noqa: E501
14
+
15
+
16
+ # import models into model package
17
+ from teaspoons_client.models.admin_pipeline import AdminPipeline
18
+ from teaspoons_client.models.admin_quota import AdminQuota
19
+ from teaspoons_client.models.async_pipeline_run_response import AsyncPipelineRunResponse
20
+ from teaspoons_client.models.error_report import ErrorReport
21
+ from teaspoons_client.models.get_jobs_response import GetJobsResponse
22
+ from teaspoons_client.models.get_pipeline_details_request_body import GetPipelineDetailsRequestBody
23
+ from teaspoons_client.models.get_pipeline_runs_response import GetPipelineRunsResponse
24
+ from teaspoons_client.models.get_pipelines_result import GetPipelinesResult
25
+ from teaspoons_client.models.job_control import JobControl
26
+ from teaspoons_client.models.job_report import JobReport
27
+ from teaspoons_client.models.job_result import JobResult
28
+ from teaspoons_client.models.pipeline import Pipeline
29
+ from teaspoons_client.models.pipeline_run import PipelineRun
30
+ from teaspoons_client.models.pipeline_run_report import PipelineRunReport
31
+ from teaspoons_client.models.pipeline_user_provided_input_definition import PipelineUserProvidedInputDefinition
32
+ from teaspoons_client.models.pipeline_with_details import PipelineWithDetails
33
+ from teaspoons_client.models.prepare_pipeline_run_request_body import PreparePipelineRunRequestBody
34
+ from teaspoons_client.models.prepare_pipeline_run_response import PreparePipelineRunResponse
35
+ from teaspoons_client.models.quota_with_details import QuotaWithDetails
36
+ from teaspoons_client.models.start_pipeline_run_request_body import StartPipelineRunRequestBody
37
+ from teaspoons_client.models.system_status import SystemStatus
38
+ from teaspoons_client.models.system_status_systems_value import SystemStatusSystemsValue
39
+ from teaspoons_client.models.update_pipeline_request_body import UpdatePipelineRequestBody
40
+ from teaspoons_client.models.update_quota_limit_request_body import UpdateQuotaLimitRequestBody
41
+ from teaspoons_client.models.version_properties import VersionProperties
@@ -0,0 +1,103 @@
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 AdminPipeline(BaseModel):
26
+ """
27
+ Object containing the pipeline identifier, version, display name, description, and control workspace information for a Pipeline.
28
+ """ # noqa: E501
29
+ pipeline_name: StrictStr = Field(description="The identifier string for the Pipeline. ", alias="pipelineName")
30
+ pipeline_version: StrictInt = Field(description="An identifier Integer for the Pipeline Version. ", alias="pipelineVersion")
31
+ display_name: StrictStr = Field(description="The display name for the Pipeline. ", alias="displayName")
32
+ description: StrictStr = Field(description="The description for the Pipeline. ")
33
+ wdl_method_version: StrictStr = Field(description="An identifier string for the Pipeline Wdl Version i.e. github repo tag/branch/release ", alias="wdlMethodVersion")
34
+ workspace_billing_project: StrictStr = Field(description="The Terra billing project of the workspace to run the pipeline in. ", alias="workspaceBillingProject")
35
+ workspace_name: StrictStr = Field(description="The name of the workspace to run the pipeline in. ", alias="workspaceName")
36
+ workspace_storage_container_name: StrictStr = Field(description="The name of the workspace storage container (e.g. google bucket name, without gs:// prefix). ", alias="workspaceStorageContainerName")
37
+ workspace_google_project: StrictStr = Field(description="The google project of the workspace to run the pipeline in. ", alias="workspaceGoogleProject")
38
+ __properties: ClassVar[List[str]] = ["pipelineName", "pipelineVersion", "displayName", "description", "wdlMethodVersion", "workspaceBillingProject", "workspaceName", "workspaceStorageContainerName", "workspaceGoogleProject"]
39
+
40
+ model_config = ConfigDict(
41
+ populate_by_name=True,
42
+ validate_assignment=True,
43
+ protected_namespaces=(),
44
+ )
45
+
46
+
47
+ def to_str(self) -> str:
48
+ """Returns the string representation of the model using alias"""
49
+ return pprint.pformat(self.model_dump(by_alias=True))
50
+
51
+ def to_json(self) -> str:
52
+ """Returns the JSON representation of the model using alias"""
53
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
54
+ return json.dumps(self.to_dict())
55
+
56
+ @classmethod
57
+ def from_json(cls, json_str: str) -> Optional[Self]:
58
+ """Create an instance of AdminPipeline from a JSON string"""
59
+ return cls.from_dict(json.loads(json_str))
60
+
61
+ def to_dict(self) -> Dict[str, Any]:
62
+ """Return the dictionary representation of the model using alias.
63
+
64
+ This has the following differences from calling pydantic's
65
+ `self.model_dump(by_alias=True)`:
66
+
67
+ * `None` is only added to the output dict for nullable fields that
68
+ were set at model initialization. Other fields with value `None`
69
+ are ignored.
70
+ """
71
+ excluded_fields: Set[str] = set([
72
+ ])
73
+
74
+ _dict = self.model_dump(
75
+ by_alias=True,
76
+ exclude=excluded_fields,
77
+ exclude_none=True,
78
+ )
79
+ return _dict
80
+
81
+ @classmethod
82
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
83
+ """Create an instance of AdminPipeline 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
+ "pipelineName": obj.get("pipelineName"),
92
+ "pipelineVersion": obj.get("pipelineVersion"),
93
+ "displayName": obj.get("displayName"),
94
+ "description": obj.get("description"),
95
+ "wdlMethodVersion": obj.get("wdlMethodVersion"),
96
+ "workspaceBillingProject": obj.get("workspaceBillingProject"),
97
+ "workspaceName": obj.get("workspaceName"),
98
+ "workspaceStorageContainerName": obj.get("workspaceStorageContainerName"),
99
+ "workspaceGoogleProject": obj.get("workspaceGoogleProject")
100
+ })
101
+ return _obj
102
+
103
+
@@ -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 AdminQuota(BaseModel):
26
+ """
27
+ Object containing the use id, pipeline identifier, quota limit, and quota usage of a Pipeline for a user.
28
+ """ # noqa: E501
29
+ user_id: StrictStr = Field(description="The identifier string for the user who submitted a job request. ", alias="userId")
30
+ pipeline_name: StrictStr = Field(description="The identifier string for the Pipeline. ", alias="pipelineName")
31
+ quota_limit: StrictInt = Field(description="Maximum allowable quota for the pipeline ", alias="quotaLimit")
32
+ quota_consumed: StrictInt = Field(description="Quota consumed by the user ", alias="quotaConsumed")
33
+ __properties: ClassVar[List[str]] = ["userId", "pipelineName", "quotaLimit", "quotaConsumed"]
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 AdminQuota 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 AdminQuota 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
+ "userId": obj.get("userId"),
87
+ "pipelineName": obj.get("pipelineName"),
88
+ "quotaLimit": obj.get("quotaLimit"),
89
+ "quotaConsumed": obj.get("quotaConsumed")
90
+ })
91
+ return _obj
92
+
93
+
@@ -0,0 +1,103 @@
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 teaspoons_client.models.pipeline_run_report import PipelineRunReport
25
+ from typing import Optional, Set
26
+ from typing_extensions import Self
27
+
28
+ class AsyncPipelineRunResponse(BaseModel):
29
+ """
30
+ Result of an asynchronous pipeline run request.
31
+ """ # noqa: E501
32
+ job_report: JobReport = Field(alias="jobReport")
33
+ error_report: Optional[ErrorReport] = Field(default=None, alias="errorReport")
34
+ pipeline_run_report: PipelineRunReport = Field(alias="pipelineRunReport")
35
+ __properties: ClassVar[List[str]] = ["jobReport", "errorReport", "pipelineRunReport"]
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 AsyncPipelineRunResponse 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
+ # override the default output from pydantic by calling `to_dict()` of job_report
77
+ if self.job_report:
78
+ _dict['jobReport'] = self.job_report.to_dict()
79
+ # override the default output from pydantic by calling `to_dict()` of error_report
80
+ if self.error_report:
81
+ _dict['errorReport'] = self.error_report.to_dict()
82
+ # override the default output from pydantic by calling `to_dict()` of pipeline_run_report
83
+ if self.pipeline_run_report:
84
+ _dict['pipelineRunReport'] = self.pipeline_run_report.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 AsyncPipelineRunResponse 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
+ "jobReport": JobReport.from_dict(obj["jobReport"]) if obj.get("jobReport") is not None else None,
98
+ "errorReport": ErrorReport.from_dict(obj["errorReport"]) if obj.get("errorReport") is not None else None,
99
+ "pipelineRunReport": PipelineRunReport.from_dict(obj["pipelineRunReport"]) if obj.get("pipelineRunReport") is not None else None
100
+ })
101
+ return _obj
102
+
103
+
@@ -0,0 +1,91 @@
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 ErrorReport(BaseModel):
26
+ """
27
+ ErrorReport
28
+ """ # noqa: E501
29
+ message: StrictStr
30
+ status_code: StrictInt = Field(alias="statusCode")
31
+ causes: List[StrictStr]
32
+ __properties: ClassVar[List[str]] = ["message", "statusCode", "causes"]
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 ErrorReport 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 ErrorReport 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
+ "message": obj.get("message"),
86
+ "statusCode": obj.get("statusCode"),
87
+ "causes": obj.get("causes")
88
+ })
89
+ return _obj
90
+
91
+
@@ -0,0 +1,99 @@
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, Optional
22
+ from teaspoons_client.models.job_report import JobReport
23
+ from typing import Optional, Set
24
+ from typing_extensions import Self
25
+
26
+ class GetJobsResponse(BaseModel):
27
+ """
28
+ result of a getJobs request
29
+ """ # noqa: E501
30
+ total_results: Optional[StrictInt] = Field(default=None, alias="totalResults")
31
+ page_token: Optional[StrictStr] = Field(default=None, alias="pageToken")
32
+ results: Optional[List[JobReport]] = Field(default=None, description="List of retrieved jobs")
33
+ __properties: ClassVar[List[str]] = ["totalResults", "pageToken", "results"]
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 GetJobsResponse 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 each item in results (list)
75
+ _items = []
76
+ if self.results:
77
+ for _item_results in self.results:
78
+ if _item_results:
79
+ _items.append(_item_results.to_dict())
80
+ _dict['results'] = _items
81
+ return _dict
82
+
83
+ @classmethod
84
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
85
+ """Create an instance of GetJobsResponse from a dict"""
86
+ if obj is None:
87
+ return None
88
+
89
+ if not isinstance(obj, dict):
90
+ return cls.model_validate(obj)
91
+
92
+ _obj = cls.model_validate({
93
+ "totalResults": obj.get("totalResults"),
94
+ "pageToken": obj.get("pageToken"),
95
+ "results": [JobReport.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None
96
+ })
97
+ return _obj
98
+
99
+
@@ -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, StrictInt
21
+ from typing import Any, ClassVar, Dict, List, Optional
22
+ from typing import Optional, Set
23
+ from typing_extensions import Self
24
+
25
+ class GetPipelineDetailsRequestBody(BaseModel):
26
+ """
27
+ Object containing the user-provided information defining a pipeline details request
28
+ """ # noqa: E501
29
+ pipeline_version: Optional[StrictInt] = Field(default=None, description="An identifier Integer for the Pipeline Version. ", alias="pipelineVersion")
30
+ __properties: ClassVar[List[str]] = ["pipelineVersion"]
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 GetPipelineDetailsRequestBody 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 GetPipelineDetailsRequestBody 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
+ "pipelineVersion": obj.get("pipelineVersion")
84
+ })
85
+ return _obj
86
+
87
+